diff options
author | Philippe Blain <levraiphilippeblain@gmail.com> | 2024-03-16 21:16:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-18 09:28:40 -0700 |
commit | ec0300914b42277077f51a8c7e3438d7565eb261 (patch) | |
tree | 098c6439f74730b97cb6cd2e784ab753146a0821 /Documentation/config | |
parent | 2953d95d402b6bff1a59c4712f4d46f1b9ea137f (diff) | |
download | git-ec0300914b42277077f51a8c7e3438d7565eb261.tar.gz |
sequencer: allow disabling conflict advice
Allow disabling the advice shown when a squencer operation results in a
merge conflict through a new config 'advice.mergeConflict', which is
named generically such that it can be used by other commands eventually.
Remove that final '\n' in the first hunk in sequencer.c to avoid an
otherwise empty 'hint: ' line before the line 'hint: Disable this
message with "git config advice.mergeConflict false"' which is
automatically added by 'advise_if_enabled'.
Note that we use 'advise_if_enabled' for each message in the second hunk
in sequencer.c, instead of using 'if (show_hints &&
advice_enabled(...)', because the former instructs the user how to
disable the advice, which is more user-friendly.
Update the tests accordingly. Note that the body of the second test in
t3507-cherry-pick-conflict.sh is enclosed in double quotes, so we must
escape them in the added line. Note that t5520-pull.sh, which checks
that we display the advice for 'git rebase' (via 'git pull --rebase')
does not have to be updated because it only greps for a specific line in
the advice message.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/advice.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt index f833411653..0e35ae5240 100644 --- a/Documentation/config/advice.txt +++ b/Documentation/config/advice.txt @@ -56,6 +56,8 @@ advice.*:: Shown when the user's information is guessed from the system username and domain name, to tell the user how to set their identity configuration. + mergeConflict:: + Shown when various commands stop because of conflicts. nestedTag:: Shown when a user attempts to recursively tag a tag object. pushAlreadyExists:: |