From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: Junio C Hamano <gitster@pobox.com>,
Usman Akinyemi via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2] diff: update conflict handling for whitespace to issue a warning
Date: Thu, 14 Nov 2024 06:29:55 -0500 [thread overview]
Message-ID: <CAPSxiM9ejv-ZHHu3UkB-ktokae9w7HiUxmByMRUVMSbG1u5Nxg@mail.gmail.com> (raw)
In-Reply-To: <29c81cbc-3678-4b70-9e0e-c500186d159f@gmail.com>
On Thu, Nov 14, 2024 at 5:06 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> On 14/11/2024 02:15, Junio C Hamano wrote:
> > "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.]
>
> Thanks
Hi Philip and Junio,
>
> >> 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.
>
> Usman - when you're writing a commit message it is important to explain
> the reason for making the changes contained in the patch so others can
> understand why it is a good idea. In this case the idea is to avoid
> breaking "git diff" for everyone who clones a repository containing a
> .gitattributes file with bad whitespace attributes [1]. As I mentioned
> in [2] I think we only want to change the behavior when parsing
> whitespace attributes - we still want the other callers of
> parse_whitespace_rule() to die() so the user can fix their config or
> commandline. We can do that by adding a boolean parameter called
> "gentle" that determines whether we call warning() or die().
I am very sorry for the confusion. I will take this into consideration
next time and always give more explanation
in commit messages.
I will make the necessary changes.
Thank you very much.
Usman.
>
> Best Wishes
>
> Phillip
>
> [1]
> https://lore.kernel.org/git/e4a70501-af2d-450a-a232-4c7952196a74@gmail.com
> [2]
> https://lore.kernel.org/git/3c081d3c-3f6f-45ff-b254-09f1cd6b7de5@gmail.com
>
> >> 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.
>
next prev parent reply other threads:[~2024-11-14 11:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 17:49 [PATCH] diff: update conflict handling for whitespace to issue a warning Usman Akinyemi via GitGitGadget
2024-11-11 23:59 ` Junio C Hamano
2024-11-13 19:01 ` [PATCH v2] " Usman Akinyemi via GitGitGadget
2024-11-14 2:15 ` Junio C Hamano
2024-11-14 10:06 ` Phillip Wood
2024-11-14 11:29 ` Usman Akinyemi [this message]
2024-11-15 0:11 ` Junio C Hamano
2024-11-18 21:03 ` Usman Akinyemi
2024-11-19 0:36 ` Junio C Hamano
2024-11-19 16:49 ` Phillip Wood
2024-11-20 1:23 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPSxiM9ejv-ZHHu3UkB-ktokae9w7HiUxmByMRUVMSbG1u5Nxg@mail.gmail.com \
--to=usmanakinyemi202@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).