Skip to content

Teach ghstack pull to update whole local stacks#355

Open
ezyang wants to merge 1 commit into
mainfrom
gh/ezyang/68/head
Open

Teach ghstack pull to update whole local stacks#355
ezyang wants to merge 1 commit into
mainfrom
gh/ezyang/68/head

Conversation

@ezyang
Copy link
Copy Markdown
Owner

@ezyang ezyang commented May 19, 2026

When ghstack pull is run from the top of a local stack, pull each PR bottom-up instead of only updating the HEAD PR. This keeps parent PR source ids current before replaying later local commits, so a subsequent ghstack submit --stack does not fail on a stale lower commit.

Also make pull robust to rewritten remote head histories by falling back to a synthetic merge base from the recorded ghstack-source-id tree when the old head commit is not reachable.

Add regression tests for rewritten head history, stale parent repair after a top-only pull, and repeated pulls preserving the final tree.

[ghstack-poisoned]
@ezyang
Copy link
Copy Markdown
Owner Author

ezyang commented May 19, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant