diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-04-02 13:10:33 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-02 10:41:42 -0700 |
commit | 224c2171637ee71c36cb6b0ed314d14216725d6f (patch) | |
tree | 711aa2f13216d2c8676481515efa11c7ab84a676 /t | |
parent | f24f715e05399cba19cb9455fdd7d8a9806fe61b (diff) | |
download | git-224c2171637ee71c36cb6b0ed314d14216725d6f.tar.gz |
remote.c: introduce remote.pushdefault
This new configuration variable defines the default remote to push to,
and overrides `branch.<name>.remote` for all branches. It is useful
in the typical triangular-workflow setup, where the remote you're
fetching from is different from the remote you're pushing to.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5516-fetch-push.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index b800a8ea1b..797b537d8a 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -497,6 +497,18 @@ test_expect_success 'push with config remote.*.push = HEAD' ' check_push_result testrepo $the_first_commit heads/local ' +test_expect_success 'push with remote.pushdefault' ' + mk_test up_repo heads/master && + mk_test down_repo heads/master && + test_config remote.up.url up_repo && + test_config remote.down.url down_repo && + test_config branch.master.remote up && + test_config remote.pushdefault down && + git push && + check_push_result up_repo $the_first_commit heads/master && + check_push_result down_repo $the_commit heads/master +' + test_expect_success 'push with config remote.*.pushurl' ' mk_test testrepo heads/master && |