]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5516-fetch-push.sh
Merge branch 'cb/clear-quarantine-early-on-all-ref-update-errors'
[thirdparty/git.git] / t / t5516-fetch-push.sh
index da70c45857295d4d5fc8a8518bc289148e72d126..3137eb8d4d2613005586ad0e8d1eea606f4b81bf 100755 (executable)
@@ -229,6 +229,18 @@ test_expect_success 'push with negotiation proceeds anyway even if negotiation f
        test_i18ngrep "push negotiation failed" err
 '
 
+test_expect_success 'push with negotiation does not attempt to fetch submodules' '
+       mk_empty submodule_upstream &&
+       test_commit -C submodule_upstream submodule_commit &&
+       git submodule add ./submodule_upstream submodule &&
+       mk_empty testrepo &&
+       git push testrepo $the_first_commit:refs/remotes/origin/first_commit &&
+       test_commit -C testrepo unrelated_commit &&
+       git -C testrepo config receive.hideRefs refs/remotes/origin/first_commit &&
+       git -c submodule.recurse=true -c protocol.version=2 -c push.negotiate=1 push testrepo refs/heads/main:refs/remotes/origin/main 2>err &&
+       ! grep "Fetching submodule" err
+'
+
 test_expect_success 'push without wildcard' '
        mk_empty testrepo &&