Files
github__gh-stack/cmd
Sameen Karim 8c2d9e3da6 sync: skip trunk fast-forward silently when local branch doesn't exist (#125)
When the trunk branch (e.g. main) doesn't exist locally — only the
remote tracking ref (origin/main) exists — `fastForwardTrunk` called
`git rev-parse main origin/main` which failed, emitting:

  ⚠ Could not compare trunk main with remote — skipping trunk update

This also caused `stackNeedsRebase` to always return true (since
`IsAncestor("main", ...)` errors out), forcing an unnecessary rebase
and force-push on every sync.

Add a `BranchExists` check at the top of `fastForwardTrunk`. If the
local trunk doesn't exist, return silently — there's nothing to
fast-forward, and the remote tracking ref is sufficient for rebasing
via git's DWIM resolution.
2026-06-15 13:54:19 -04:00
..
2026-05-26 17:39:38 -04:00
2026-05-26 17:39:38 -04:00
2026-04-10 03:32:08 -04:00
2026-05-15 14:01:02 -04:00
2026-06-15 13:54:18 -04:00
2026-06-15 13:54:18 -04:00
2026-05-15 14:01:02 -04:00
2026-05-26 17:39:37 -04:00
2026-05-26 17:39:37 -04:00
2026-06-15 13:54:18 -04:00
2026-06-15 13:54:18 -04:00
2026-05-04 22:34:42 -04:00
2026-05-26 17:39:38 -04:00
2026-04-10 03:32:08 -04:00
2026-05-15 14:01:02 -04:00
2026-05-15 14:01:02 -04:00
2026-05-26 17:39:36 -04:00
2026-05-15 14:01:03 -04:00
2026-05-26 17:39:39 -04:00
2026-04-20 11:20:27 -04:00
2026-05-15 14:01:02 -04:00
2026-05-26 17:39:36 -04:00
2026-05-26 17:39:39 -04:00
2026-05-26 17:39:39 -04:00
2026-05-15 14:01:02 -04:00
2026-04-10 03:32:08 -04:00
2026-05-15 14:01:02 -04:00