Thread (2 messages) 2 messages, 2 authors, 2025-07-11

Re: [PATCH 0/2] breaking-changes: deprecate support for core.commentChar=auto

From: Phillip Wood <hidden>
Date: 2025-07-11 15:09:23

On 09/07/2025 17:20, Junio C Hamano wrote:
Phillip Wood [off-list ref] writes:
quoted
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.
quoted
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?
Yes, though I'm on the fence about that. I wonder if we should recommend 
~/.gitconfig instead if the user account that git is running under does 
not have write access to /etc/gitconfig. That also raises the question 
of what advice we should give about clearing settings in the system 
config file if the user does not have write access to it. It is possible 
the human user has write access to the system config even if the user 
account that git is running under does not but we have no way of finding 
that out.
quoted
quoted
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.
I'm leaning towards dying to avoid any nasty surprises when the commit 
message contains lines beginning with '#'.

I'll try and re-roll next week

Thanks

Phillip
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help