use anyhow::Result;
use crate::cli::RepairArgs;
use crate::context::Context;
use crate::git;
pub fn run(ctx: &Context, args: &RepairArgs) -> Result<()> {
let repo = ctx.repo()?;
let mut cmd: Vec<String> = vec!["worktree".into(), "repair".into()];
for p in &args.paths {
cmd.push(p.to_string_lossy().into_owned());
}
let refs: Vec<&str> = cmd.iter().map(String::as_str).collect();
git::run(&repo, &refs)?;
if !ctx.json && !ctx.quiet {
let ok = crate::style::OK;
anstream::eprintln!("{ok}✓{ok:#} repaired worktree administrative files");
}
Ok(())
}