Summary
Mirror sync commands (git fetch --prune and git remote update --prune) in pkg/jobs/mirror.go inherit the 1-minute DefaultTimeout from the git-module library because no explicit timeout is set. For repos whose network fetch takes longer than 1 minute, the git process is killed mid-transfer: --prune has already removed local refs that no longer exist on remote, but new/renamed remote refs were never fully fetched before the timeout. The result is missing or stale branches.
Root cause
// pkg/jobs/mirror.go
cmd := git.NewCommand(args...).WithContext(ctx)
// No .WithTimeout(-1) → falls through to DefaultTimeout = 1 minute
The initial import in ImportRepository correctly sets Timeout: -1 (no timeout) to allow arbitrarily large clones. The sync job never applies this same protection.
Fix
Add .WithTimeout(-1) to both sync commands, mirroring the clone behavior.
Closes #633
Summary
Mirror sync commands (
git fetch --pruneandgit remote update --prune) inpkg/jobs/mirror.goinherit the 1-minuteDefaultTimeoutfrom the git-module library because no explicit timeout is set. For repos whose network fetch takes longer than 1 minute, the git process is killed mid-transfer:--prunehas already removed local refs that no longer exist on remote, but new/renamed remote refs were never fully fetched before the timeout. The result is missing or stale branches.Root cause
The initial import in
ImportRepositorycorrectly setsTimeout: -1(no timeout) to allow arbitrarily large clones. The sync job never applies this same protection.Fix
Add
.WithTimeout(-1)to both sync commands, mirroring the clone behavior.Closes #633