Merge branch 'jl/submodule-ignore-diff'
[gitweb.git] / t / t5530-upload-pack-error.sh
index 044603c26ed62e3ddf03ebb2542f783e4dd7d9ff..6b2a5f4a65659b7fcfcd9d096a0b43473e1cf1d6 100755 (executable)
@@ -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" \