diff options
| author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2025-08-26 14:35:27 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-26 08:52:44 -0700 |
| commit | a0e6aaea7da5134bdc784c6d68d4cc2125865330 (patch) | |
| tree | beb4c0512ab49f0e84a619372b1bf425b8d8140d /environment.c | |
| parent | fdae4114a696014b6bf28ad9b1bc076bd8d7eec8 (diff) | |
config: warn on core.commentString=auto
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 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 appropriately.
Note the odd combination of die_message() followed by die(NULL)
is to allow the next commit to insert a call to advise() in the middle.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/environment.c b/environment.c index 4c87876d48..1ffa2ff30b 100644 --- a/environment.c +++ b/environment.c @@ -124,6 +124,7 @@ const char *comment_line_str = "#"; char *comment_line_str_to_free; #ifndef WITH_BREAKING_CHANGES int auto_comment_line_char; +bool warn_on_auto_comment_char; #endif /* !WITH_BREAKING_CHANGES */ /* This is set by setup_git_directory_gently() and/or git_default_config() */ |
