Skip to main content

handle_apply_commit_with_handler

Function handle_apply_commit_with_handler 

Source
pub fn handle_apply_commit_with_handler<H: AppEffectHandler>(
    workspace: &dyn Workspace,
    handler: &mut H,
    logger: &Logger,
    colors: Colors,
) -> Result<()>
Expand description

Handles the --apply-commit command using effect handler abstraction.

This is a testable version that uses AppEffectHandler for git operations and Workspace for file I/O, enabling tests to use mocks for isolation.

§Arguments

  • workspace - The workspace for file operations
  • handler - The effect handler for git operations
  • logger - Logger for info/warning messages
  • colors - Color configuration for output

§Returns

Returns Ok(()) on success or an error if commit fails.