summaryrefslogtreecommitdiff
path: root/t/t5530-upload-pack-error.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2010-07-31 14:11:46 -0600
committerJunio C Hamano <gitster@pobox.com>2010-08-02 15:31:59 -0700
commit9f9aa761305e909aca9a46ccb33a5872b36bcb8e (patch)
tree8b5732592d508f2a5b26242ff8a3f55b3a65ef34 /t/t5530-upload-pack-error.sh
parentb73f294150c0c134a954ab6772688a9a39b54896 (diff)
downloadgit-9f9aa761305e909aca9a46ccb33a5872b36bcb8e.tar.gz
upload-pack: Improve error message when bad ref requested
When printing an error message saying a ref was requested that we do not have, only print that ref, rather than the ref and everything sent to us on the same packet line (e.g. protocol support specifications). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5530-upload-pack-error.sh')
-rwxr-xr-xt/t5530-upload-pack-error.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index 044603c26e..6b2a5f4a65 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -60,6 +60,15 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
grep "bad tree object" output.err
'
+test_expect_success 'upload-pack error message when bad ref requested' '
+
+ printf "0045want %s multi_ack_detailed\n00000009done\n0000" \
+ "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" >input &&
+ test_must_fail git upload-pack . <input >output 2>output.err &&
+ grep -q "not our ref" output.err &&
+ ! grep -q multi_ack_detailed output.err
+'
+
test_expect_success 'upload-pack fails due to error in pack-objects enumeration' '
printf "0032want %s\n00000009done\n0000" \