We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ac0d4c commit 6d58684Copy full SHA for 6d58684
1 file changed
cmd/sync.go
@@ -76,11 +76,11 @@ func runSync(cfg *config.Config, opts *syncOptions) error {
76
return ErrSilent
77
}
78
79
- if err := git.Fetch(remote); err != nil {
80
- cfg.Warningf("Failed to fetch %s: %v", remote, err)
81
- } else {
82
- cfg.Successf("Fetched latest changes from %s", remote)
83
- }
+ // Fetch trunk + active branches so tracking refs are current for
+ // fast-forward detection (Step 2) and --force-with-lease (Step 4).
+ fetchTargets := append([]string{s.Trunk.Branch}, activeBranchNames(s)...)
+ _ = git.FetchBranches(remote, fetchTargets)
+ cfg.Successf("Fetched latest changes from %s", remote)
84
85
// --- Step 2: Fast-forward trunk ---
86
trunk := s.Trunk.Branch
0 commit comments