]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5510-fetch.sh
Sync with 2.32.4
[thirdparty/git.git] / t / t5510-fetch.sh
index 1147ac902f8f494d2771f82c96101159e78eef8c..96b839d598f157645dfc16e6441419390b81cf0f 100755 (executable)
@@ -1215,6 +1215,19 @@ test_expect_success '--negotiation-tip understands abbreviated SHA-1' '
        check_negotiation_tip
 '
 
+test_expect_success '--negotiation-tip rejects missing OIDs' '
+       setup_negotiation_tip server server 0 &&
+       test_must_fail git -C client fetch \
+               --negotiation-tip=alpha_1 \
+               --negotiation-tip=$(test_oid zero) \
+               origin alpha_s beta_s 2>err &&
+       cat >fatal-expect <<-EOF &&
+       fatal: the object $(test_oid zero) does not exist
+EOF
+       grep fatal: err >fatal-actual &&
+       test_cmp fatal-expect fatal-actual
+'
+
 . "$TEST_DIRECTORY"/lib-httpd.sh
 start_httpd