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, 23:59 UTC
Message-ID
<91fafa17-c58f-dcd0-320d-48c4512561f6@gmail.com>
In-Reply-To
<xmqqv9m9oe2p.fsf@gitster.c.googlers.com>
On 4/8/2020 5:35 PM, Junio C Hamano wrote:
Show 14 quoted lines
> Derrick Stolee <stolee@gmail.com> writes:
> 
>> 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.
> 
> A merge that is TREESAME to its first parent does not introduce
> anything new to the mainline (as far as the paths that match the
> pathspec are concerned).  We are trying to find names to call merges
> that are not those no-op merges.  Hmph...
There are three situations for a merge commit:
1. TREESAME to _all_ parents. These are not included.
2. not TREESAME to _all_ parents. These are already included.
3. TREESAME to some, but not TREESAME to others.

The third mode is the one that default mode will drop, but --full-history will include. The new mode will include some of these (the ones that are NOT TREESAME to their first parent).

Show 13 quoted lines
>> 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
> 
> ...none of the above tells me that they are not no-op (in other
> words, they do something meaningful), so I must be coming from
> a direction different from you are.  What redirects from what other
> thing, for example?
The merges do something meaningful: they "merge in" a "real" change.

I'll just submit my v2 as-is, which includes a significant change to the documentation that should make things more clear.

Thanks, -Stolee

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 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.