diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2008-05-11 18:28:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-11 11:51:12 -0700 |
commit | dfd1b749befcb581d84722caa6a3af56ce6526a5 (patch) | |
tree | 0f7b1e456937ec3309927c007cb460327353c557 /t | |
parent | 28bfa145e4dedad9b2c81857b77ca13871c77853 (diff) | |
download | git-dfd1b749befcb581d84722caa6a3af56ce6526a5.tar.gz git-dfd1b749befcb581d84722caa6a3af56ce6526a5.tar.xz |
rev-parse --verify: do not output anything on error
Before this patch, when "git rev-parse --verify" was passed at least one
good rev and then anything, it would output something for the good rev
even if it would latter exit on error.
With this patch, we only output something if everything is ok.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t1503-rev-parse-verify.sh | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh index e93f1b38e..95244c9bc 100755 --- a/t/t1503-rev-parse-verify.sh +++ b/t/t1503-rev-parse-verify.sh @@ -83,17 +83,11 @@ test_expect_success 'fails silently when using -q' ' test -z "$(cat error)" ' -test_expect_success '1 no stdout output on error' ' +test_expect_success 'no stdout output on error' ' test -z "$(git rev-parse --verify)" && test -z "$(git rev-parse --verify foo)" && - test -z "$(git rev-parse --verify baz HEAD)" -' - -test_expect_failure '2 no stdout output on error' ' - test -z "$(git rev-parse --verify HEAD bar)" -' - -test_expect_failure '3 no stdout output on error' ' + test -z "$(git rev-parse --verify baz HEAD)" && + test -z "$(git rev-parse --verify HEAD bar)" && test -z "$(git rev-parse --verify $HASH2 HEAD)" ' |