pub fn handle_reset_start_commit<H: AppEffectHandler>(
handler: &mut H,
working_dir_override: Option<&PathBuf>,
) -> Result<String, String>Expand description
Handle the --reset-start-commit command using effects.
This function resets the .agent/start_commit file to track the
merge-base with the default branch (or HEAD if on main/master).
§Arguments
handler- The effect handler to execute operations throughworking_dir_override- Optional directory override (for testing)
§Returns
Returns the OID that was written to the start_commit file, or an error.
§Effects Emitted
SetCurrentDir- If working_dir_override is providedGitRequireRepo- Validates git repository existsGitGetRepoRoot- Gets the repository root pathSetCurrentDir- Changes to repo root (if no override)GitResetStartCommit- Resets the start commit reference