From ed24928e122bad83e62d161087f806fa21c46a59 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 14 Dec 2005 01:45:40 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- t/t5400-send-pack.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't/t5400-send-pack.sh') diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 7fc3bd7d3e..f3694ac3c7 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! -- cgit v1.2.3