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

so/diff-merges-more (was Re: What's cooking in git.git (Feb 2023, #01; Thu, 2))

From
Glen Choo <chooglen@google.com>
Date
Feb 7, 2023, 04:06 UTC
Message-ID
<kl6lr0v2i0gn.fsf@chooglen-macbookpro.roam.corp.google.com>
In-Reply-To
<871qn5pyez.fsf@osv.gnss.ru>
Hi Sergey,
Sergey Organov <sorganov@gmail.com> writes:
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>
>> * so/diff-merges-more (2022-12-18) 5 commits
>>  - diff-merges: improve --diff-merges documentation
>>  - diff-merges: issue warning on lone '-m' option
>>  - diff-merges: support list of values for --diff-merges
>>  - diff-merges: implement log.diffMerges-m-imply-p config
>>  - diff-merges: implement [no-]hide option and log.diffMergesHide config
>>
>>  Assorted updates to "--diff-merges=X" option.
>>
>>  May want to discard.  Breaking compatibility does not seem worth it.
>>  source: <20221217132955.108542-1-sorganov@gmail.com>
>
> Hi Junio,
>
> This does not break any compatibility, as far as me and I believe
> reviewers of these series are aware.

My 2 cents (which maybe lines up with what Junio meant) is that this series doesn't break compatibility on its own, but IMO the approach doesn't make sense unless we also intend to flip the default somewhere down the line. "log.diffMerges-m-imply-p" is a really specific config option, and it needs to justify its addition with an outsized benefit.

I don't think it meets that bar, the only use cases I can think of are:
- Before we change the default, setting "log.diffMerges-m-imply-p=true"
  gives the 'nicer' behavior. But if the user had the permissions and
  knowledge to do so, they could just pass "-p" instead for correctness.
  If the goal is to reduce typing, then we could add a different CLI
  flag that would behave like "-m -p", or we could teach "git diff" to
  accept proper single-character flags. Either of these options would be
  more discoverable and cleaner.
- After we change the default, setting "log.diffMerges-m-imply-p=false"
  gives the old behavior, which might be needed if the user is running
  scripts written in for an older version of Git. I would find this
  compelling, but as Junio mentioned [1], breaking compatibility doesn't
  seem worth it, so this point is moot. On the other hand, neither of
  the alternative approaches break compatibility, so they're superior in
  this regard too.
- The only legitimate use case I think of is something like a script
  that uses "-m" assuming that it implied "-p", AND the user has no
  ability to modify the script. Then the user's only recourse is to set
  a config. But this is so exotic that I don't think this is a good
  enough reason to have the config.

I wouldn't mind seeing a version of these patches without "log.diffMerges-m-imply-p=false" , but in its current form, I agree with Junio that this isn't worth it.

[1] https://lore.kernel.org/git/xmqqbko1xv86.fsf@gitster.g/
Previous: Sergey OrganovNext: Sergey Organov
Message 10 of 30 in “What's cooking in git.git (Feb 2023, #01; Thu, 2)”
  1. Junio C HamanoFeb 3, 2023
  2. Sergey OrganovFeb 4, 2023
  3. Junio C HamanoFeb 6, 2023
  4. Sergey OrganovFeb 6, 2023
  5. Sergey OrganovMar 1, 2023
  6. Junio C HamanoMar 1, 2023
  7. Sergey OrganovMar 1, 2023
  8. Glen ChooMar 1, 2023
  9. Sergey OrganovMar 2, 2023
  10. so/diff-merges-more (was Re: What's cooking in git.git (Feb 2023, #01; Thu, 2))Glen Choo, Feb 7, 2023
  11. Sergey OrganovFeb 7, 2023
  12. Glen ChooMar 2, 2023
  13. Junio C HamanoMar 2, 2023
  14. Sergey OrganovMar 2, 2023
  15. Glen ChooMar 6, 2023
  16. Sergey OrganovMar 7, 2023
  17. Junio C HamanoMar 7, 2023
  18. Sergey OrganovMar 8, 2023
  19. Junio C HamanoMar 8, 2023
  20. Sergey OrganovMar 9, 2023
  21. Glen ChooMar 9, 2023
  22. Sergey OrganovMar 9, 2023
  23. Glen ChooMar 10, 2023
  24. Junio C HamanoMar 10, 2023
  25. Sergey OrganovMar 17, 2023
  26. Junio C HamanoMar 18, 2023
  27. Sergey OrganovMar 25, 2023
  28. Sergey OrganovMar 29, 2023
  29. Sergey OrganovMar 29, 2023
  30. ds/bundle-uri-5 (was: Re: What's cooking in git.git (Feb 2023, #01; Thu, 2))Victoria Dye, Feb 8, 2023

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.