aboutsummaryrefslogtreecommitdiff
path: root/t/t5400-send-pack.sh
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2005-12-14 01:45:40 +0100
committerJunio C Hamano <junkio@cox.net>2005-12-13 18:15:02 -0800
commited24928e122bad83e62d161087f806fa21c46a59 (patch)
tree907f465252423e3a3ff6897ef4eaeb53729db3c0 /t/t5400-send-pack.sh
parent9954f5b876abb6118f9bdf1d113239d86acca7bd (diff)
downloadgit-ed24928e122bad83e62d161087f806fa21c46a59.tar.gz
git-ed24928e122bad83e62d161087f806fa21c46a59.tar.xz
Make git-send-pack exit with error when some refs couldn't be pushed out
In case some refs couldn't be pushed out due to an error (mostly the not-a-proper-subset error), make git-send-pack exit with non-zero status after the push is over (that is, it still tries to push out the rest of the refs). [jc: I adjusted a test for this change.] Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-xt/t5400-send-pack.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 7fc3bd7d3..f3694ac3c 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -43,7 +43,15 @@ test_expect_success setup '
test_expect_success \
'pushing rewound head should not barf but require --force' '
# should not fail but refuse to update.
- git-send-pack ./victim/.git/ master &&
+ if git-send-pack ./victim/.git/ master
+ then
+ # now it should fail with Pasky patch
+ echo >&2 Gaah, it should have failed.
+ false
+ else
+ echo >&2 Thanks, it correctly failed.
+ true
+ fi &&
if cmp victim/.git/refs/heads/master .git/refs/heads/master
then
# should have been left as it was!