-
Notifications
You must be signed in to change notification settings - Fork 65.5k
fix: description of Pull Request comparison #40204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+3
−3
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -73,11 +73,11 @@ For more information about Git commands to compare changes, see [Git diff option | |||||
|
|
||||||
| ## About three-dot comparison on {% data variables.product.prodname_dotcom %} | ||||||
|
|
||||||
| Since the three-dot comparison compares with the merge base, it is focusing on "what a pull request introduces." | ||||||
| Since the three-dot comparison compares with the merge base, it is focusing on the differences between the latest common commit of the topic branch and the base branch. | ||||||
|
|
||||||
| When you use a two-dot comparison, the diff changes when the base branch is updated, even if you haven't made any changes to the topic branch. Additionally, a two-dot comparison focuses on the base branch. This means that anything you add is displayed as missing from the base branch, as if it was a deletion, and vice versa. As a result, the changes the topic branch introduces become ambiguous. | ||||||
| Note, that with three-dot comparison, the diff changes when the base branch is updated, even if you haven't made any changes to the topic branch, because the diff shows all of the changes since the branches diverged. Additionally, a three-dot comparison focuses on the base branch. This means that anything you add is displayed as missing from the base branch, as if it was a deletion, and vice versa. As a result, the changes the topic branch introduces become ambiguous. | ||||||
|
|
||||||
| In contrast, by comparing the branches using the three-dot comparison, changes in the topic branch are always in the diff if the base branch is updated, because the diff shows all of the changes since the branches diverged. | ||||||
| In contrast, by comparing the branches using the two-dot comparison, only the changes in the topic branch would show in the diff if the base branch is updated, because the diff will only show the actual changes between the branches. | ||||||
|
||||||
| In contrast, by comparing the branches using the two-dot comparison, only the changes in the topic branch would show in the diff if the base branch is updated, because the diff will only show the actual changes between the branches. | |
| In contrast, a two-dot comparison shows all differences between the tips of the two branches, including changes from base branch updates. If the base branch is updated, those changes will also appear in the diff, not just the changes made in the topic branch. It's the three-dot comparison that isolates changes made in the topic branch since the branches diverged. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is technically incorrect. Three-dot comparison shows changes since the merge base (common ancestor), not all changes since branches diverged. It focuses on what the topic branch introduces, not the base branch. The statement about displaying additions as missing from base branch is also incorrect for three-dot comparison.