refactor(cli): sweep 15 bail("git X") sites to use git_run with context labels

This commit is contained in:
adlee-was-taken
2026-05-08 22:10:25 -04:00
parent f3cdbed7b6
commit 97c8f994e1
6 changed files with 50 additions and 46 deletions

View File

@@ -282,8 +282,7 @@ pub(super) fn cmd_backup_restore(input: PathBuf, target: PathBuf) -> Result<()>
}
} else {
// No history bundled — start a fresh git repo.
let status = crate::helpers::git_command(&target, &["init"]).status()?;
if !status.success() { anyhow::bail!("git init failed"); }
crate::helpers::git_run(&target, &["init"], "backup restore: git init")?;
// .gitignore — exclude reference image if present.
if target.join("reference.jpg").exists() {