Merge branch 'jk/diff-graph-submodule-summary'
[gitweb.git] / t / t5516-fetch-push.sh
index 797b537d8aa0be522c6530ceb000b704fc5a95f9..838e71dafea8388cbe18c82b26f58f074f56abbd 100755 (executable)
@@ -236,10 +236,10 @@ test_expect_success 'push with pushInsteadOf' '
 
 test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf should not rewrite)' '
        mk_empty testrepo &&
-       TRASH="$(pwd)/" &&
-       test_config "url.trash2/.pushInsteadOf" trash/ &&
+       test_config "url.trash2/.pushInsteadOf" testrepo/ &&
+       test_config "url.trash3/.pusnInsteadOf" trash/wrong &&
        test_config remote.r.url trash/wrong &&
-       test_config remote.r.pushurl "$TRASH/testrepo" &&
+       test_config remote.r.pushurl "testrepo/" &&
        git push r refs/heads/master:refs/remotes/origin/master &&
        (
                cd testrepo &&
@@ -519,6 +519,21 @@ test_expect_success 'push with config remote.*.pushurl' '
        check_push_result testrepo $the_commit heads/master
 '
 
+test_expect_success 'push with config branch.*.pushremote' '
+       mk_test up_repo heads/master &&
+       mk_test side_repo heads/master &&
+       mk_test down_repo heads/master &&
+       test_config remote.up.url up_repo &&
+       test_config remote.pushdefault side_repo &&
+       test_config remote.down.url down_repo &&
+       test_config branch.master.remote up &&
+       test_config branch.master.pushremote down &&
+       git push &&
+       check_push_result up_repo $the_first_commit heads/master &&
+       check_push_result side_repo $the_first_commit heads/master &&
+       check_push_result down_repo $the_commit heads/master
+'
+
 test_expect_success 'push with dry-run' '
 
        mk_test testrepo heads/master &&