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

Re: [PATCH v2] diff: update conflict handling for whitespace to issue a warning

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 19, 2024, 00:36 UTC
Message-ID
<xmqqcyishxf1.fsf@gitster.g>
In-Reply-To
<CAPSxiM-H378tKrnLqiTYaWbGb9fPitRzqVpBf+7+Tu03Th3UPg@mail.gmail.com>
Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
Show 17 quoted lines
> On Fri, Nov 15, 2024 at 12:11 AM Junio C Hamano <gitster@pobox.com> wrote:
>> ...
>> If we were to fix anything, it is to make sure that we die() before
>> producing a single line of output.  If you have a change to a path
>> whose "type" is without such a misconfigured attribute, that sorts
>> lexicographically earlier than another path with a change, with a
>> conflicting whitespace attribute, I suspect that with the way the
>> code is structured currently, we show the diff for the first path,
>> before realizing that the second path has an issue and then die.
>>
>> If we fix it, and then make sure that the die() message shows
>> clearly what attribute setting we did not like, that would be
>> sufficient to help users to locate the problem, fix it, and quickly
>> move on, no?
>
> Thanks for the review. From what I understand from your comment,
> we should leave it the way it was which was die right ?

Correct. I do not think replacing die() with warning() without doing anything else makes sense. Making sure that we detect the breakage before going half-way while producing a patch that touches many paths may improve the end-user experience, though.

Thanks.
Previous: Usman AkinyemiNext: Phillip Wood
Message 9 of 11 in “diff: update conflict handling for whitespace to issue a warning”
  1. diff: update conflict handling for whitespace to issue a warningUsman Akinyemi via GitGitGadget, Nov 11, 2024
  2. Junio C HamanoNov 11, 2024
  3. diff: update conflict handling for whitespace to issue a warningUsman Akinyemi via GitGitGadget, Nov 13, 2024
  4. Junio C HamanoNov 14, 2024
  5. Phillip WoodNov 14, 2024
  6. Usman AkinyemiNov 14, 2024
  7. Junio C HamanoNov 15, 2024
  8. Usman AkinyemiNov 18, 2024
  9. Junio C HamanoNov 19, 2024
  10. Phillip WoodNov 19, 2024
  11. Junio C HamanoNov 20, 2024

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.