From e01ae2a4a7e99357b9464b54e48cbf4b4caac036 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 19 Nov 2020 10:22:29 +0000 Subject: pull: colorize the hint about setting `pull.rebase` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In d18c950a69f (pull: warn if the user didn't say whether to rebase or to merge, 2020-03-09), a new hint was introduced to encourage users to make a conscious decision about whether they want their pull to merge or to rebase by configuring the `pull.rebase` setting. This warning was clearly intended to advise users, but as pointed out in https://lore.kernel.org/git/87ima2rdsm.fsf%40evledraar.gmail.com, it uses `warning()` instead of `advise()`. One consequence is that the advice is not colorized in the same manner as other, similar messages. So let's use `advise()` instead. Pointed-out-by: Ævar Arnfjörð Bjarmason Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t7601-merge-pull-config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't/t7601-merge-pull-config.sh') diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh index c5c4ea5fc0..6774e9d86f 100755 --- a/t/t7601-merge-pull-config.sh +++ b/t/t7601-merge-pull-config.sh @@ -29,8 +29,11 @@ test_expect_success 'setup' ' test_expect_success 'pull.rebase not set' ' git reset --hard c0 && - git pull . c1 2>err && - test_i18ngrep "Pulling without specifying how to reconcile" err + git -c color.advice=always pull . c1 2>err && + test_decode_color decoded && + test_i18ngrep "hint: " decoded && + test_i18ngrep "Pulling without specifying how to reconcile" decoded + ' test_expect_success 'pull.rebase not set and pull.ff=true' ' -- cgit v1.2.3