]> git.ipfire.org Git - thirdparty/git.git/commit - t/t4150-am.sh
builtin/am: allow disabling conflict advice
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Sat, 16 Mar 2024 21:16:30 +0000 (21:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Mar 2024 16:28:42 +0000 (09:28 -0700)
commit37ce97353c5be708ce2f86e176e99b62507332cc
tree0916466a395949e4916ba5c86e570fc1d1090780
parentec0300914b42277077f51a8c7e3438d7565eb261
builtin/am: allow disabling conflict advice

When 'git am' or 'git rebase --apply' encounter a conflict, they show a
message instructing the user how to continue the operation. This message
can't be disabled.

Use ADVICE_MERGE_CONFLICT introduced in the previous commit to allow
disabling it. Update the tests accordingly, as the advice output is now
on stderr instead of stdout. In t4150, redirect stdout to 'out' and
stderr to 'err', since this is less confusing. In t4254, as we are
testing a specific failure mode of 'git am', simply disable the advice.
Note that we are not testing that this advice is shown in 'git rebase'
for the apply backend since 2ac0d6273f (rebase: change the default
backend from "am" to "merge", 2020-02-15).

Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c
t/t4150-am.sh
t/t4254-am-corrupt.sh