public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Phillip Wood <phillip.wood123@gmail•com>
Cc: git@vger•kernel.org,  Ayush Chandekar <ayu.chandekar@gmail•com>,
	 Oswald Buddenhagen <oswald.buddenhagen@gmx•de>,
	 Taylor Blau <me@ttaylorr•com>,
	Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail•com>
Subject: Re: [PATCH 0/2] breaking-changes: deprecate support for core.commentChar=auto
Date: Wed, 09 Jul 2025 09:20:41 -0700	[thread overview]
Message-ID: <xmqqfrf5nxnq.fsf@gitster.g> (raw)
In-Reply-To: <f679151a-c843-44d4-9e28-27112d26f30c@gmail.com> (Phillip Wood's message of "Wed, 9 Jul 2025 10:38:19 +0100")

Phillip Wood <phillip.wood123@gmail•com> writes:

> With hindsight I should have been clearer here that the advice given
> is based on the user's config settings.

Ahh, OK.  If the "hint" advice message gets generated with custom
sequence of commands, that explains why the sample looked so uneven.
Disregard what I said about clearing every variant from every scope.

> The advice will recommend a command that updates commentChar in the
> scope where it is currently set so if it is set globally it will not
> prompt you to set it locally in each repository and if it is set
> locally it will prompt you to update it there.

Again, I misunderstood the set-up that would lead to the sample
output.  If the user has "auto" in ~/.gitconfig, replacing it at the
same place may make sense.

If the "auto" comes from /etc/gitconfig then we'd recommend
changing it there, instead of overriding it per-user in ~/.gitconfig?

>> It would be necessary to special case "auto" after 3.0 boundary
>> anyway, whether we (1) die when we notice the value is set to
>> "auto", and refuse to work until the user chooses a comment char, or
>> (2) use "#" or something hardcoded.  Either would be better than
>> using literal string "auto" as comment char.
>
> We can do that if you've changed your view from
> <xmqqfrj6vfsn.fsf@gitster•g>

Yeah, I think using "auto " as comment line prefix is simply a
nonsense.  Thanks.

>> So, a simpler approach might be to treat literal string "auto" as if
>> "#" was specified under WITH_BREAKING_CHANGES so that the end-user
>> does not have to do anything when they want to "revert" to the
>> default comment string.  Then we do not have to give any large text
>> like the above.  We can instead say something like
>> 	The 'auto' setting of core.commentChar (or core.commentString)
>> 	will change its meaning in Git 3.0 and later and will always
>> 	use the default '#'.
>
> That's certainly simpler for us but it does not help the user to
> update their config. Presumably they're using the auto commentchar
> because '#' does not work for them.

OK.  But those with "auto" because '#' did not work for them are
setting "auto" not because '#' does not work, but because none of
these "#;@!$%^&|:" work for them, no?

As you said earlier, the "auto" setting cannot fundamentally work at
all if we let a third-party inject any commented material into the
editor buffer.  The comment we inject ourselves we can control (and
notice), and perhaps back in the simpler days when "auto" setting
was invented, it was sufficient.  But that may be no longer true, so
it may not be just "tricky to fix" but simply "unworkable".  From
that point of view, as long as the reason clearly is explained to
end-users, I am fine with "'auto' stops Git and you'd need to unset
or set it to something else at the 3.0 boundary".

Thanks.

  reply	other threads:[~2025-07-09 16:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08 13:56 [PATCH 0/2] breaking-changes: deprecate support for core.commentChar=auto Phillip Wood
2025-07-08 13:56 ` [PATCH 1/2] breaking-changes: deprecate support for core.commentString=auto Phillip Wood
2025-07-08 15:28   ` Ayush Chandekar
2025-07-09  9:40     ` Phillip Wood
2025-07-08 13:56 ` [PATCH 2/2] commit: print advice when core.commentString=auto Phillip Wood
2025-07-08 18:51 ` [PATCH 0/2] breaking-changes: deprecate support for core.commentChar=auto Junio C Hamano
2025-07-09  9:38   ` Phillip Wood
2025-07-09 16:20     ` Junio C Hamano [this message]
2025-07-11 15:09       ` Phillip Wood
2025-07-11 17:07         ` Junio C Hamano
2025-07-12  8:01           ` Oswald Buddenhagen
2025-07-12 14:06             ` Junio C Hamano
2025-07-26 23:15         ` Junio C Hamano
2025-07-27 15:46           ` Phillip Wood
2025-07-09  1:27 ` Junio C Hamano
2025-07-09  1:52   ` Ayush Chandekar
2025-07-09  9:38   ` Phillip Wood
2025-07-31 15:21 ` [PATCH v2 0/3] " Phillip Wood
2025-07-31 15:21   ` [PATCH v2 1/3] breaking-changes: deprecate support for core.commentString=auto Phillip Wood
2025-07-31 20:49     ` Junio C Hamano
2025-07-31 15:21   ` [PATCH v2 2/3] config: warn on core.commentString=auto Phillip Wood
2025-07-31 21:17     ` Junio C Hamano
2025-08-01 10:37       ` Phillip Wood
2025-08-01 14:36     ` Oswald Buddenhagen
2025-07-31 15:21   ` [PATCH v2 3/3] commit: print advice when core.commentString=auto Phillip Wood
2025-08-01 15:18     ` Oswald Buddenhagen
2025-08-01 17:19       ` Junio C Hamano
2025-08-26 13:33       ` Phillip Wood
2025-08-27  8:19         ` Oswald Buddenhagen
2025-08-27 16:39           ` Junio C Hamano
2025-08-27 22:38             ` Oswald Buddenhagen
2025-08-01  3:50   ` [PATCH v2 0/3] breaking-changes: deprecate support for core.commentChar=auto Junio C Hamano
2025-08-01 10:36     ` Phillip Wood
2025-08-01 16:41       ` Junio C Hamano
2025-08-26 13:35 ` [PATCH v3 " Phillip Wood
2025-08-26 13:35   ` [PATCH v3 1/3] breaking-changes: deprecate support for core.commentString=auto Phillip Wood
2025-08-26 13:35   ` [PATCH v3 2/3] config: warn on core.commentString=auto Phillip Wood
2025-08-26 15:52     ` Junio C Hamano
2025-08-27 15:29       ` Phillip Wood
2025-08-27 18:55         ` Junio C Hamano
2025-08-26 13:35   ` [PATCH v3 3/3] commit: print advice when core.commentString=auto Phillip Wood
2025-08-27 15:27 ` [PATCH v4 0/3] breaking-changes: deprecate support for core.commentChar=auto Phillip Wood
2025-08-27 15:27   ` [PATCH v4 1/3] breaking-changes: deprecate support for core.commentString=auto Phillip Wood
2025-08-27 15:27   ` [PATCH v4 2/3] config: warn on core.commentString=auto Phillip Wood
2025-08-27 15:27   ` [PATCH v4 3/3] commit: print advice when core.commentString=auto Phillip Wood

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=xmqqfrf5nxnq.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=ayu.chandekar@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=kristofferhaugsbakk@fastmail$(echo .)com \
    --cc=me@ttaylorr$(echo .)com \
    --cc=oswald.buddenhagen@gmx$(echo .)de \
    --cc=phillip.wood123@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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