Skip to content

gh stack sync merged approved PRs into bottom branch #155

Description

@sfllaw

Reproduction steps:

  1. Create a stack of PRs
  2. Approve all of them
  3. Run git stack sync

Actual result

sfllaw@h2co3:~/src/tailscale_sfllaw-routecheck-for-reachability$ gh stack sync
✓ Fetched latest changes from origin
⚠ Failed to fast-forward main: failed to run git: fatal: cannot force update the branch 'main' used by worktree at '/home/sfllaw/Projects/tailscale'


Rebasing stack ...
✓ Rebased sfllaw/routecheck-for-reachability onto main
✓ Rebased sfllaw/routecheck/tailscale-routecheck-cli-jsonoutput onto sfllaw/routecheck-for-reachability
✓ Rebased sfllaw/routecheck/suggest-exit-node-force-probe onto sfllaw/routecheck/tailscale-routecheck-cli-jsonoutput
✓ Rebased sfllaw/routecheck/suggest-exit-node onto sfllaw/routecheck/suggest-exit-node-force-probe
✓ Rebased sfllaw/routecheck/background-probing onto sfllaw/routecheck/suggest-exit-node

Pushing 5 branches to origin...
✓ Pushed 5 branches

Syncing PRs ...
⚠ sfllaw/routecheck-for-reachability has no PR
✓ PR #19950 (sfllaw/routecheck/tailscale-routecheck-cli-jsonoutput) — Open
✓ PR #19658 (sfllaw/routecheck/suggest-exit-node-force-probe) — Open
✓ PR #19643 (sfllaw/routecheck/suggest-exit-node) — Open
✓ PR #19642 (sfllaw/routecheck/background-probing) — Open

✓ Stack synced
sfllaw@h2co3:~/src/tailscale_sfllaw-routecheck-for-reachability$ gh stack view --short
├ sfllaw/routecheck/background-probing ○ #19642
├─── merged ────
│ sfllaw/routecheck/suggest-exit-node ✓ #19643
│ sfllaw/routecheck/suggest-exit-node-force-probe ✓ #19658
│ sfllaw/routecheck/tailscale-routecheck-cli-jsonoutput ✓ #19950
» sfllaw/routecheck-for-reachability (current)
└ main

Expected result

I didn’t expect any auto-merging. git stack sync should have just rebased and updated the refs:

sfllaw@h2co3:~/src/tailscale_sfllaw-routecheck-for-reachability$ gh stack view --short
│ sfllaw/routecheck/background-probing ○ #19642
│ sfllaw/routecheck/suggest-exit-node ○ #19643
│ sfllaw/routecheck/suggest-exit-node-force-probe ○ #19658
│ sfllaw/routecheck/tailscale-routecheck-cli-jsonoutput ○ #19950
» sfllaw/routecheck-for-reachability (current)
└ main

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions