From 0e987a12fc1d481d81ad9c56f4714efb08667213 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 16 Jun 2009 15:33:01 -0700 Subject: am, rebase: teach quiet option git-am and git-rebase are talkative scripts. Teach them to be quiet when told, allowing them to speak only when they fail or experience errors. The quiet option is maintained when git-am or git-rebase fails to apply a patch. This means subsequent --resolved, --continue, --skip, --abort invocations will be quiet if the original invocation was quiet. Drop a handful of >&2 redirection; the rest of the program sends all the info messages to stdout, not to stderr. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- t/t4150-am.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't/t4150-am.sh') diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 51c369ad14..a12bf84623 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -180,6 +180,17 @@ test_expect_success 'am -3 falls back to 3-way merge' ' test -z "$(git diff lorem)" ' +test_expect_success 'am -3 -q is quiet' ' + git reset master2 --hard && + sed -n -e "3,\$p" msg >file && + head -n 9 msg >>file && + git add file && + test_tick && + git commit -m "copied stuff" && + git am -3 -q lorem-move.patch > output.out 2>&1 && + ! test -s output.out +' + test_expect_success 'am pauses on conflict' ' git checkout lorem2^^ && test_must_fail git am lorem-move.patch && @@ -313,4 +324,11 @@ test_expect_success 'am newline in subject' ' grep "^Applying: second \\\n foo$" output.out ' +test_expect_success 'am -q is quiet' ' + git checkout first && + test_tick && + git am -q < patch1 > output.out 2>&1 && + ! test -s output.out +' + test_done -- cgit v1.2.1