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

Re: [PATCH v2] wt-status: use rename settings from init_diff_ui_defaults

From
Junio C Hamano <gitster@pobox.com>
Date
May 1, 2018, 23:11 UTC
Message-ID
<xmqqlgd3x972.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CABPp-BFbVP3iwAbaa2cEPw9Sr+ANJoHHYHOCQ4oAZoVdyX164A@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 16 quoted lines
> I'm not certain what the default should be, but I do believe that it
> should be consistent between these commands.  I lean towards
> considering break detection being on by default a good thing, but
> there are some interesting issues to address:
>   - there is no knob to adjust break detection for status, only for
> diff/log/show/etc.
>   - folks have a knob to turn break detection on (for diff/log/show),
> but not one to turn it off
>   - for status, break detection makes no sense if rename detection is off.
>   - for diff/log/show, break detection provides almost no value if
> rename detection is off (only a dissimilarity index), suggesting that
> if user turns rename detection off and doesn't explicitly ask for
> break detection, then it's a waste of time to have it be on
>   - merge-recursive would break horribly right now if someone turned
> break detection on for it.  Turning it on might be a good long term
> goal, but it's not an easy change.

Many of the issues in the above list are surmountable. A new option could be added to "status" to enable break or "diff" family to disable it if we really wanted to. A new "rewritten" state can be added alongside with "modified" to "status" output.

A more serious issue around "-B" is this one:
    https://public-inbox.org/git/xmqqegqaahnh.fsf@gitster.dls.corp.google.com/

Even though the message is back from 2015 and asks users not to use -B/-M together for anything critical "for now", the issue has not been resolved and the same bug remains with us in the current code.

In the longer term, I suspect that it might make sense to have an option to let users choose among "I do not want to have anything to do with -B", "I always want -B when I ask for -M" and "I always want -B whether I ask for -M". But unfortunately the latter two with the current codebase is an unacceptably risky/broken choice.

Show 13 quoted lines
>
> So, where does that leave us?  My opinion is
>   - these commands should be consistent.  Eckhard's patch makes them so.
>   - we might want to move towards break detection being on as the
> default.  That's a couple patch series (one for everything but
> merge-recursive, and a separate much bigger series for
> merge-recursive).
>
> But I can see others saying we should leave things inconsistent until
> we can fix the other commands to use break detection as the default.
> So...thoughts?
>
> Elijah
Previous: Elijah NewrenNext: Elijah Newren
Message 8 of 14 in “wt-status: use rename settings from init_diff_ui_defaults”
  1. wt-status: use rename settings from init_diff_ui_defaultsEckhard S. Maaß, May 1, 2018
  2. Ævar Arnfjörð BjarmasonMay 1, 2018
  3. Eckhard MaaßMay 1, 2018
  4. Matthieu MoyMay 1, 2018
  5. Eckhard MaaßMay 1, 2018
  6. Matthieu MoyMay 1, 2018
  7. Elijah NewrenMay 1, 2018
  8. Junio C HamanoMay 1, 2018
  9. Elijah NewrenMay 2, 2018
  10. Ben PeartMay 2, 2018
  11. Eckhard MaaßMay 3, 2018
  12. wt-status: use settings from git_diff_ui_configEckhard S. Maaß, May 4, 2018
  13. Elijah NewrenMay 4, 2018
  14. Eckhard MaaßMay 1, 2018

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.