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>
This commit is contained in:
committed by
Junio C Hamano
parent
fdae4114a6
commit
a0e6aaea7d
@@ -1242,6 +1242,9 @@ int cmd_rebase(int argc,
|
||||
builtin_rebase_usage,
|
||||
builtin_rebase_options);
|
||||
|
||||
#ifndef WITH_BREAKING_CHANGES
|
||||
warn_on_auto_comment_char = true;
|
||||
#endif /* !WITH_BREAKING_CHANGES */
|
||||
prepare_repo_settings(the_repository);
|
||||
the_repository->settings.command_requires_full_index = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user