Re: [PATCH] revision: --include-diversions adds helpful merges
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Apr 8, 2020, 01:39 UTC
- Message-ID
- <5f1c6868-303c-ccc1-553e-e54d0fa8e24f@gmail.com>
- In-Reply-To
- <xmqqv9mapxw9.fsf@gitster.c.googlers.com>
On 4/7/2020 9:30 PM, Junio C Hamano wrote:
Show 17 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > >> This --include-diversions option could use a better name. > > True, but I do not think of a better (or for that matter a worse) > one. > > As a new feature, I think this is a reasonable thing to want, > especially it is in line with the push in the past few years to > treat the first parent history specially. > > I wonder how this would interact with the ancestry-path option? > That one also, like the simplify-merges option, needs a limited > traversal, and if this new mode can do without a limited traversal > (in other words, the output can be done incrementally from the tip) > and achieve something similar to what these other options wanted to > show, that would be great.
You're right. I briefly considered the --ancestry-path option before realizing that would get a huge set of commits (for example: every topic based on the branch after the pull request was merged).
The --include-diversions works incrementally like simplified merges. Based on the implementation, it would not change the results when added to a --full-history query. This makes sense: a diversion would appear in the --full-history results, anyway.
It is worth adding tests for the combination with --ancestry-path and --simplify-merges, as the --include-diversions option would add results to those queries.
Thanks, -Stolee