Add instructions to compare page for viewing diff on local
Release notes
Problem to solve
The compare page in the product is not very useful when you need to go through the diff to look for particular changes (for example to check if there are post-deploy migrations). This is due to:
- The compare page is paginated, which means that you need to search through every page rather than just searching once.
- The compare page does not display all commits if there are a large number of commits in the diff.
- The page also does not display a list of all changed files.
For example, when an incident occurs, we need to check the diff of the last deployment to look for anything that might have caused the incident. Sometimes we have information that a change to a particular set of files might have caused the incident, so searching/filtering for file names/paths is useful.
This is currently much easier to do using the git diff
command, since you can do things like:
- Display only filenames rather than the full changes. Ex:
git diff b551088d1ff...8c7225a3d12 --name-only
) - Filter for particular file name/path patterns. For example, this would only display changes to files under the
db
folder:git diff b551088d1ff...8c7225a3d12 -- db/
.
Proposal
Display commands to view a diff on local, at the top of the compare page. For example, on https://gitlab.com/gitlab-org/security/gitlab/-/compare/b551088d1ff...8c7225a3d12, it could display something like:
git diff b551088d1ff...8c7225a3d12 [--name-only]
Intended users
Metrics
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.