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 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
8880c61067
commit
6d29f34cd0
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user