Diff a subset of files between two branches
Continuing from the conversation started on epic 516.
CC @aweinmanEpic, @a.conrad, @shoyle1
Problem to solve
There's no means by which to compare just a few files across a pair of wildly-different branches. I won't completely replicate my comment on the epic, but I'll try to get the highlights. This is related to #16860.
- We have a very large repository (evidently several orders of magnitude larger than the Linux kernel) and a two-stage code review / testing system that ends up with two integrated branches.
- With a few thousand developers working on these integrated branches five days a week, there are a lot of differences between these branches at any given moment.
- The second code review pass has no good means to review the changes from a specific pull request / changeset. Attempting to
/compare/
the two integrated branches results in a much larger diff than the interface can handle.
We do not have any immediate plans to use Merge Requests in GitLab. Our tentative plans to move down to one integrated branch are at least a few years out from fruition.
Proposal
The solution proposed here would be to allow /compare/
diffs to narrow the files being compared -- if not totally via the UI / a constructed URL, then at least programmatically. One approach I mentioned on the epic might look like this: some customer-owned process sends an API request that provides a pair of branches and a list of files to diff. The API responds with a single token that can be used to construct a /compare/
URL. (This sidesteps the length restrictions on URLs.)
Intended users
(These are guesses; not too familiar with your personas yet)