eazygit 0.5.1

A fast TUI for Git with staging, conflicts, rebase, and palette-first UX
Documentation
pub mod git_commands;
pub mod custom;
pub mod patch;
pub mod branch;
pub mod stash;
#[cfg(test)]
pub mod test_utils;

pub use git_commands::{
    StageFilesCommand,
    UnstageFilesCommand,
    CommitCommand,
    PushCommand,
    CherryPickCommand,
    RevertCommand,
    RebaseSaveAndRunCommand,
    RebaseContinueCommand,
    RebaseSkipCommand,
    RebaseAbortCommand,
    RebaseResolveConflictsCommand,
    RebaseAbortFromConflictCommand,
    RebaseContinueInterruptedCommand,
    RebaseAbortInterruptedCommand,
    ResetCommand,
    ListMergedBranchesCommand,
    PruneMergedBranchesCommand,
    RemotePruneCommand,
    ShowRemoteUrlCommand,
    SetRemoteSshCommand,
    AutoFetchCommand,
    // RebaseTodoXXX commands REMOVED - rebase feature removed
    PrListCommand,
    PrCheckoutCommand,
    PrOpenCommand,
    LogBriefCommand,
    LogStatsCommand,
    PullCommand,
    PullRebaseCommand,
    PullMergeCommand,
    FetchAllPruneCommand,
    OpenInEditorCommand,
    CheckMergeStatusCommand,
};
pub use patch::{
    StageHunkCommand,
    UnstageHunkCommand,
    StageLinesCommand,
    UnstageLinesCommand,
};
pub use branch::{CheckoutBranchCommand, MergeBranchCommand, RebaseBranchCommand, CreateBranchCommand};
pub use stash::{ApplyStashCommand, PopStashCommand, CreateStashCommand, DeleteStashCommand};
#[cfg(test)]
#[allow(unused_imports)]
pub use test_utils::*;

use crate::services::GitService;
use crate::app::AppState;
use crate::errors::CommandError;

/// Command trait for executing side effects (git operations)
pub trait Command: Send + Sync {
    /// Execute the command
    fn execute(
        &self,
        git: &GitService,
        state: &AppState,
    ) -> Result<CommandResult, CommandError>;
}

/// Result of command execution
#[derive(Debug)]
pub enum CommandResult {
    /// State update to apply
    StateUpdate(AppState),
    /// Async task spawned (handled separately)
    #[allow(dead_code)]
    AsyncTask(crate::app::state::AsyncTask),
    /// No state change needed
    #[allow(dead_code)]
    NoOp,
}