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 14, 2024, 02:15 UTC
Message-ID
<xmqq4j4a8srw.fsf@gitster.g>
In-Reply-To
<pull.1828.v2.git.git.1731524467045.gitgitgadget@gmail.com>
"Usman Akinyemi via GitGitGadget" <gitgitgadget@gmail.com> writes:

[jc: As Phillip is blamed for suggesting this addition, I added him to the recipient of this message.]

Show 10 quoted lines
> From: Usman Akinyemi <usmanakinyemi202@gmail.com>
>
> Modify the conflict resolution between tab-in-indent and
> indent-with-non-tab to issue a warning instead of terminating
> the operation with `die()`. Update the `git diff --check` test to
> capture and verify the warning message output.
>
> Suggested-by: Phillip Wood <phillip.wood123@gmail.com>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---

If the settings requires an impossible way to use whitespaces, the settings is buggy, and it generally would be better to correct the setting before moving on.

I am curious to know in what situations this new behaviour can be seen as an improvement. It may allow you to go on _without_ fixing such a broken setting, but how would it help the end user? If the user set both of these mutually-incompatible options A and B by mistake, but what the user really wanted to check for was A, picking just one of A or B arbitrarily and disabling it would not help, and disabling both would not help, either. But wouldn't the real source of the problem be that we are trying to demote die() to force the user to correct contradictiong setting into warning()?

Thanks.
Previous: Usman Akinyemi via GitGitGadgetNext: Phillip Wood
Message 4 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.