Repository navigation
Sync stacks with the remote trunk when the local one can't move - #67
Merged
Merged
Conversation
When trunk is checked out somewhere with a change in the way of its fast
forward (say an uncommitted go.work.sum in the main checkout while you
work in a linked worktree), sync left trunk behind, and then everything
after it worked from that stale tip. A branch whose pull request had
merged was kept ("merged into main but that isn't in main yet"), and the
branches above it weren't restacked past it, so the submit that syncs
first went on to open a pull request carrying the already merged commits
and pulled in their reviewers.
For a trunk that was only behind its remote, sync now uses the remote's
tip in its place for cleanup and restack, and says so in a notice. Local
trunk is still left alone and the result still says it wasn't updated;
it fast forwards onto the same commits once the change is out of the way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If trunk is checked out somewhere with a change in the way of its fast forward (an uncommitted
go.work.sumin the main checkout while you're working in a linked worktree, say), sync leaves trunk where it is, which is right. But everything after that then worked from the stale tip: a branch whose PR had merged was kept ("merged into main but that isn't in main yet") and the branches above it weren't restacked past it. The submit that syncs first then went ahead and opened a PR carrying the already merged commits, pulling in their reviewers too.Now, for a trunk that was only behind its remote, sync uses the remote's tip in its place for cleanup and restack, and adds a notice saying so. The local trunk is still left alone and the result still says it wasn't updated; once the change is out of the way it fast forwards onto the same commits.