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

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

From
Glen Choo <chooglen@google.com>
Date
Mar 6, 2023, 22:22 UTC
Message-ID
<kl6lzg8pcygl.fsf@chooglen-macbookpro.roam.corp.google.com>
In-Reply-To
<87wn3zqefx.fsf@osv.gnss.ru>
Sergey Organov <sorganov@gmail.com> writes:
Show 15 quoted lines
>> but I have been under the impression that the remainder were OK
>> clean-ups.  Perhaps it is mostly because I read them so long ago and
>> forgot the details X-<.
>
> It's not a cleanup, it's rather adding missed feature that allows to get
> precise '-m' behavior with --diff-merges.
> ...
> However, by making such decision we lost ability to provide exact
> behavior of -m using --diff-merges= set of options. This has been
> pointed out later to me in the list, and felt obliged to finish
> implementation by providing the feature.
>
>   --diff-merges=hide
>
> is exactly that.

This is exactly the "immortaliz[ing] a mistake" that I mentioned upthread, by turning a UX wart (-m doesn't imply -p) that neither of us likes into a feature. I'd be in favor of getting rid of the wart altogether (i.e. let's find a path that lets us make -m imply -p in the future), but not rebranding it as a feature.

Show 16 quoted lines
>>> I'm not convinced that the series makes sense without
>>> "log.diffMerges-m-imply-p":
>>>
>>> * The main patch is
>>>
>>>     diff-merges: implement [no-]hide option and log.diffMergesHide config
>>>
>>>   which gives us a way to redefine "-m" as "--diff-merges=hide
>>>   --diff-merges=on". However, we haven't seen any compelling reasons to
>>>   use --diff-merges=hide [1].
>
> I think --diff-merges should be complete and be able to provide exact "-m"
> behavior, rendering the latter pure shortcut.
>
> Complete orthogonal interfaces are good thing by themselves, and useful
> applications of them are often found later. That's common knowledge.

For the user who wants it, yes, but these interfaces come with a maintenance cost and a cost to the user who just wants the simpler interface.

I think that our goals here are actually the same: we both want Git to be as simple and usable as possible. We disagree on whether this series makes Git simpler or more complex (and I don't think either of us will change our minds any time soon), but I think we can agree on an overall direction. With that in mind, I'd be willing to discuss other approaches that get us closer to "-m implies -p", if you have any.

Show 8 quoted lines
>>> I'm also fairly convinced that if we go
>>>   back in time, "-m" wouldn't have the semantics of 'do nothing unless
>>>   -p is also given', and I don't think we should immortalize a mistake
>>>   by giving it an explicit option.
>
> Yep, and I provided a config option that fixes this mistake. What's
> wrong about it? The complete orthogonal interface finalized by the
> aforementioned feature allows me to achieve this goal easily.
Addressed above.
Previous: Sergey OrganovNext: Sergey Organov
Message 15 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.