eazygit 0.5.1

A fast TUI for Git with staging, conflicts, rebase, and palette-first UX
Documentation
//! Git command implementations organized by functionality.
//!
//! This module contains all Git-related command implementations, split into
//! focused sub-modules for better organization and maintainability.
//!
//! **Module Organization:**
//! - `stage.rs` - Stage/unstage file operations
//! - `commit.rs` - Commit operations
//! - `push_pull.rs` - Push and pull operations
//! - `rebase.rs` - Rebase operations and todo management
//! - `cherry_pick_revert.rs` - Cherry-pick and revert operations
//! - `reset.rs` - Reset operations
//! - `branch_management.rs` - Branch listing and pruning
//! - `remote.rs` - Remote repository operations
//! - `pr.rs` - Pull request operations (GitHub-style)
//! - `log.rs` - Log viewing operations
//! - `editor.rs` - External editor integration
//! - `merge.rs` - Merge status checking
//! - `utils.rs` - Shared utility functions

pub mod stage;
pub mod commit;
pub mod push_pull;
pub mod rebase;
pub mod cherry_pick_revert;
pub mod reset;
pub mod branch_management;
pub mod remote;
pub mod pr;
pub mod log;
pub mod editor;
pub mod merge;
pub mod utils;

// Re-export all command types for convenience
pub use stage::{StageFilesCommand, UnstageFilesCommand};
pub use commit::CommitCommand;
pub use push_pull::{PushCommand, PullCommand, PullRebaseCommand, PullMergeCommand, FetchAllPruneCommand};
pub use rebase::{RebaseSaveAndRunCommand, RebaseContinueCommand, RebaseSkipCommand, RebaseAbortCommand, RebaseResolveConflictsCommand, RebaseAbortFromConflictCommand, RebaseContinueInterruptedCommand, RebaseAbortInterruptedCommand};
pub use cherry_pick_revert::{CherryPickCommand, RevertCommand};
pub use reset::ResetCommand;
pub use branch_management::{ListMergedBranchesCommand, PruneMergedBranchesCommand};
pub use remote::{
    RemotePruneCommand,
    ShowRemoteUrlCommand,
    SetRemoteSshCommand,
    AutoFetchCommand,
};
pub use pr::{PrListCommand, PrCheckoutCommand, PrOpenCommand};
pub use log::{LogBriefCommand, LogStatsCommand};
pub use editor::OpenInEditorCommand;
pub use merge::CheckMergeStatusCommand;

// Re-export utility functions (used internally by commands)

#[cfg(test)]
mod tests {
    use super::*;
    use crate::app::AppState;
    use crate::commands::Command;
    use crate::services::GitService;
    use crate::commands::git_commands::utils::to_github_pr_url;
    use std::fs;

    #[test]
    fn to_github_pr_url_https() {
        let url = "https://github.com/org/repo.git";
        let ssh = to_github_pr_url(url, "12").unwrap();
        assert_eq!(ssh, "https://github.com/org/repo/pull/12");
    }

}