Repository navigation
fix(but-workspace): stop diverged branches from replaying their own history - #16295
Draft
PavelLaptev wants to merge 2 commits into
Draft
PavelLaptev wants to merge 2 commits into
PavelLaptev wants to merge 2 commits into
Conversation
…ote work When the forge merged the target into a pushed branch while the branch was rebased locally onto that same target, the merge stayed as the one remote commit the local branch lacks. The desktop app then showed its yellow "Update local branch" button, though both tips held the same tree and a force-push was all that was left. A remote tip that is a merge with the local tip's tree now leaves nothing on the remote. Merges only, so an empty remote commit, like one to retrigger CI, still shows as something a force-push would drop.
After the branch was rebased locally, its remote still holds the old copies of the same commits. Pull rebase replayed those copies first and the local commits on top, so every change was applied twice: mostly empty commits, and add/add conflicts where one commit adds a file a later one changes. Pull rebase, and Smart squash when it falls back to it, now skip remote commits a local commit is a newer version of, paired by change-id or by author and message as the workspace status already does. Merge and Pick remote keep every remote commit.
This branch has not been deployed
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.
Two user reports: after a workspace update, a branch whose PR was updated on GitHub shows the yellow "Update local branch" button, and the recommended Pull rebase then doubles the branch's history and conflicts on files nobody else touched.
keeps_graph_truth_even_when_change_ids_match, nowpull_rebase_skips_remote_commits_paired_with_local_ones. If a collaborator amends a remote commit but keeps its change-id, the local version wins.