From: Phillip Wood <phillip.wood123@gmail•com>
To: git@vger•kernel.org
Cc: Ayush Chandekar <ayu.chandekar@gmail•com>,
Oswald Buddenhagen <oswald.buddenhagen@gmx•de>,
Taylor Blau <me@ttaylorr•com>,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail•com>
Subject: [PATCH v4 0/3] breaking-changes: deprecate support for core.commentChar=auto
Date: Wed, 27 Aug 2025 16:27:27 +0100 [thread overview]
Message-ID: <cover.1756308431.git.phillip.wood@dunelm.org.uk> (raw)
In-Reply-To: <cover.1751983009.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm•org.uk>
This series implements the plan to deprecate and remove support for
core.commentChar=auto outlined in [1]. This feature has been the
source of a couple of bug reports recently [2,3] and it is hard to
see how the design can be fixed as it is incompatible with preparing
a commit message template containing comments. When git sees the
deprecated config setting it will print advice based on the user's
config setting to help the user either remove the setting or set a
custom comment string. In the example below core.commentString is set
multiple times in $XDG_CONFIG_HOME/git/config and core.commentChar
is set in ~/.gitconfig and $XDG_CONFIG_HOME/git/config.
warning: Support for 'core.commentChar=auto' is deprecated and will be removed in Git 3.0
hint:
hint: To use the default comment string (#) please run
hint:
hint: git config unset --file ~/.config/git/config --all core.commentString
hint: git config unset --file ~/.config/git/config core.commentChar
hint: git config unset --global core.commentChar
hint:
hint: To set a custom comment string please run
hint:
hint: git config set --global core.commentChar <comment string>
hint:
hint: where '<comment string>' is the string you wish to use.
[1] https://lore.kernel.org/git/6a3154e0-e7bc-45ae-b554-67ccab18727a@gmail.com
[2] https://lore.kernel.org/git/20250315140913.577404-1-oswald.buddenhagen@gmx.de
[3] https://lore.kernel.org/git/20250626132233.414789-1-ayu.chandekar@gmail.com
Changes since V3:
- Patch 2: Remove repeated word from commit message
Changes since V2:
- Patch 1: Punctuation fixes
- Patch 2: Reworded the commit message slightly
Remove unnecessary include of advice.h
Fix variable declaration
- Patch 3: Include advice.h
Changes since V1:
- Rebased onto a merge of 'ps/config-wo-the-repository' and 'master'
- Reworded commit messages
- What was patch 2 has been split into two separate patches and
reworked to die when core.commentChar=auto and WITH_BREAKING_CHANGES
is enabled.
Base-Commit: 1ae5bd276bdf101e37c1a8f2904a2eae05fbb744
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Fremove-auto-comment-char%2Fv4
View-Changes-At: https://github.com/phillipwood/git/compare/1ae5bd276...39d824db4
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/remove-auto-comment-char/v4
Phillip Wood (3):
breaking-changes: deprecate support for core.commentString=auto
config: warn on core.commentString=auto
commit: print advice when core.commentString=auto
Documentation/BreakingChanges.adoc | 5 +
Documentation/config/core.adoc | 20 +-
builtin/commit.c | 7 +
builtin/merge.c | 3 +
builtin/rebase.c | 3 +
builtin/revert.c | 7 +
config.c | 297 ++++++++++++++++++++++++++++-
environment.c | 11 +-
environment.h | 3 +
repository.c | 1 +
repository.h | 3 +
t/t3404-rebase-interactive.sh | 19 +-
t/t3418-rebase-continue.sh | 2 +-
t/t7502-commit-porcelain.sh | 52 ++++-
14 files changed, 421 insertions(+), 12 deletions(-)
Range-diff against v3:
1: 5b921064f1e = 1: 5b921064f1e breaking-changes: deprecate support for core.commentString=auto
2: 5dd897c95e6 ! 2: e92511ce21c config: warn on core.commentString=auto
@@ Commit message
As support for this setting was deprecated in the last commit print a
warning (or die when WITH_BREAKING_CHANGES is enabled) if it is set.
- Avoid bombarding the user with warnings by only printing it (a) when
- running commands commands that call "git commit" and (b) only once
- per command. Some scaffolding is added to repo_read_config() to allow
+ Avoid bombarding the user with warnings by only printing it (a)
+ when running commands that call "git commit" and (b) only once per
+ command. Some scaffolding is added to repo_read_config() to allow
it to detect deprecated config settings and warn about them. As both
"core.commentChar" and "core.commentString" set the comment character
we record which one of them is used and tailor the warning message
3: ee6cf11a82c = 3: 39d824db4ab commit: print advice when core.commentString=auto
--
2.49.0.897.gfad3eb7d210
next prev parent reply other threads:[~2025-08-27 15:27 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
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 ` Phillip Wood [this message]
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=cover.1756308431.git.phillip.wood@dunelm.org.uk \
--to=phillip.wood123@gmail$(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.wood@dunelm$(echo .)org.uk \
/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