huskies: merge 1155 story Bracket logging around install_pre_commit_hook to diagnose bug 1151 freezes

This commit is contained in:
dave
2026-05-19 23:54:05 +00:00
parent 5bca1f6cec
commit e7456d3391
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -163,12 +163,21 @@ pub fn install_pre_commit_hook(wt_path: &Path) -> Result<(), String> {
// Point git at the per-worktree hooks dir so only this worktree uses
// these hooks (not the main repo or other worktrees).
slog!(
"[worktree-hook] starting git config --worktree core.hooksPath for '{}'",
wt_path.display()
);
let output = std::process::Command::new("git")
.args(["config", "--worktree", "core.hooksPath", ".git-hooks"])
.current_dir(wt_path)
.output()
.map_err(|e| format!("git config --worktree core.hooksPath: {e}"))?;
slog!(
"[worktree-hook] finished git config --worktree core.hooksPath for '{}' status={}",
wt_path.display(),
output.status
);
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
return Err(format!(