From 6d29f34cd01dc56ed776b850affa2db9bfa537a4 Mon Sep 17 00:00:00 2001 From: gastown/crew/jack Date: Sat, 17 Jan 2026 00:39:14 -0800 Subject: [PATCH] fix(doctor): remove blocking git fetch from clone divergence check The CloneDivergenceCheck was calling git fetch for each clone without a timeout, causing gt doctor to hang indefinitely when network or authentication issues occurred. Removed the fetch - divergence detection now uses existing local refs (may be stale but won't block). Fixes: gt-aoklf8 Co-Authored-By: Claude Opus 4.5 --- internal/doctor/branch_check.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/doctor/branch_check.go b/internal/doctor/branch_check.go index b36d4fcb..23531aca 100644 --- a/internal/doctor/branch_check.go +++ b/internal/doctor/branch_check.go @@ -527,12 +527,7 @@ func (c *CloneDivergenceCheck) getCloneInfo(path string) (cloneInfo, error) { } info.headSHA = strings.TrimSpace(string(out)) - // Fetch to make sure we have latest refs (silent, ignore errors) - cmd = exec.Command("git", "fetch", "--quiet") - cmd.Dir = path - _ = cmd.Run() - - // Count commits behind origin/main + // Count commits behind origin/main (uses existing refs, may be stale) cmd = exec.Command("git", "rev-list", "--count", "HEAD..origin/main") cmd.Dir = path out, err = cmd.Output()