git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] revision: --include-diversions adds helpful merges

From
Derrick Stolee <stolee@gmail.com>
Date
Apr 8, 2020, 20:22 UTC
Message-ID
<9eab6c60-3c99-d6ac-9206-02ce37f7a479@gmail.com>
In-Reply-To
<20200408200526.GA2270445@coredump.intra.peff.net>
On 4/8/2020 4:05 PM, Jeff King wrote:
Show 35 quoted lines
> On Wed, Apr 08, 2020 at 12:46:41PM -0700, Junio C Hamano wrote:
> 
>> Our features written with the intent to be useful for one purpose
>> often end up being used for purposes other than what the feature was
>> originally written for (the "--pickaxe" has always been a bitter
>> example of this for me).
>>
>> For that reason, I am a bit hesitant to endorse "audit" exactly
>> because of the implication of "intent".
> 
> Yeah, I agree with this.
> 
>> I wonder if there is a simple-enough phrase to convey what the
>> latter half of above sentence says.  "include" and "keep" are both
>> good verbs---normally we discard these merges, because they do not
>> contribute at the level of individual changes, but with the option,
>> we "include" or "keep" these merges in the output.  It's not like
>> we keep _all_ the merges, but selected merges only.  How do we
>> decide which merges to keep?
>>
>> I guess your "--first-merges" came from such a line of thought, and
>> is the closest among the five to what I have in mind, but it drops
>> too many words and loses too much meaning.  
>>
>> "--keep-first-parent-merges", perhaps?
> 
> FWIW, this name left me more confused, because "first-parent merges"
> isn't an already-defined term I knew. And it seems like all merges have
> a first parent. Having read the patch description, I guess it's "a merge
> which isn't TREESAME to its first-parent".
> 
> I can't think of a more succinct way to name that, though. And possibly
> if we gave that definition in the documentation, that would be enough.
> The name doesn't have to be a complete description; it only has to make
> sense once you know what you're trying to do (and be memorable enough).
Then I suppose we should focus on naming merge commits with this property:
  A merge commit that is not TREESAME to its first parent (but is TREESAME
  to a later parent).

The part in parentheses may be optional, because a merge commit that is not TREESAME to any parent will be included by every history mode.

In my latest attempt at documentation, I called these merges "diverters" yet still used "--include-diversions". Here are a few other words that we could use:

 * diverters or diversions
 * redirects
 * switches (think railroad switch). Synonym: exchange
 * detours

The "switch" or "exchange" words are probably bad because they have noun _and_ verb forms.

Or we could look again at the history results as a whole to find inspiration for the command-line option:

 * --merge-trail

Thanks, -Stolee

Previous: Jeff KingNext: Junio C Hamano
Message 7 of 23 in “revision: --include-diversions adds helpful merges”
  1. revision: --include-diversions adds helpful mergesDerrick Stolee via GitGitGadget, Apr 8, 2020
  2. Junio C HamanoApr 8, 2020
  3. Derrick StoleeApr 8, 2020
  4. Derrick StoleeApr 8, 2020
  5. Junio C HamanoApr 8, 2020
  6. Jeff KingApr 8, 2020
  7. Derrick StoleeApr 8, 2020
  8. Junio C HamanoApr 8, 2020
  9. Derrick StoleeApr 8, 2020
  10. Junio C HamanoApr 9, 2020
  11. Derrick StoleeApr 9, 2020
  12. Philip OakleyApr 9, 2020
  13. Junio C HamanoApr 9, 2020
  14. Derrick StoleeApr 9, 2020
  15. Jeff KingApr 9, 2020
  16. Junio C HamanoApr 9, 2020
  17. Jeff KingApr 9, 2020
  18. brian m. carlsonApr 8, 2020
  19. Jeff KingApr 8, 2020
  20. revision: --include-diversions adds helpful mergesDerrick Stolee via GitGitGadget, Apr 9, 2020
  21. revision: --show-pulls adds helpful mergesDerrick Stolee via GitGitGadget, Apr 10, 2020
  22. Junio C HamanoApr 10, 2020
  23. Derrick StoleeApr 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.