-
Notifications
You must be signed in to change notification settings - Fork 63.2k
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
Conversation
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
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.
Pull Request Overview
This PR fixes documentation inaccuracies in the pull request comparison section by correcting the description of two-dot vs three-dot Git comparisons. The changes address issue #40203 by swapping incorrectly described behaviors between the two comparison methods.
- Corrects the explanation of what three-dot comparison focuses on
- Fixes the description of two-dot comparison behavior when base branch is updated
- Swaps the contrasting explanations to accurately reflect Git comparison functionality
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. |
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.
Copilot uses AI. Check for mistakes.
|
||
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. |
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 of two-dot comparison is incorrect. Two-dot comparison shows all differences between the two branch tips, including changes from base branch updates. It's the three-dot comparison that isolates topic branch changes by comparing against the merge base.
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. |
Copilot uses AI. Check for mistakes.
Why:
Closes: #40203
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following: