]> 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 e83b2a65069f6a1ddf78da5a38efd3f5f85c65e8..96b839d598f157645dfc16e6441419390b81cf0f 100755 (executable)
@@ -782,6 +782,7 @@ test_expect_success 'fetch.writeCommitGraph' '
 '
 
 test_expect_success 'fetch.writeCommitGraph with submodules' '
+       test_config_global protocol.file.allow always &&
        git clone dups super &&
        (
                cd super &&
@@ -1214,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