From: Felipe Contreras Date: Thu, 16 May 2013 07:31:14 GMT Subject: [PATCH 3/3] remote: disable allow-local for pushes Message-ID: <1368689474-28911-4-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1368689474-28911-1-git-send-email-felipe.contreras@gmail.com> So that 'git push' uses 'origin', instead of '.' by default. Signed-off-by: Felipe Contreras --- remote.c | 2 +- t/t5528-push-default.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/remote.c b/remote.c index a7e59ab..c1458dc 100644 --- a/remote.c +++ b/remote.c @@ -729,7 +729,7 @@ struct remote *remote_get(const char *name) struct remote *pushremote_get(const char *name) { read_config(); - return remote_get_1(name, pushremote_name, 1); + return remote_get_1(name, pushremote_name, 0); } struct remote *fetchremote_get(const char *name, int allow_local) diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh index 4736da8..61df2a7 100755 --- a/t/t5528-push-default.sh +++ b/t/t5528-push-default.sh @@ -115,4 +115,11 @@ test_expect_success 'push to existing branch, upstream configured with different test_cmp expect-other-name actual-other-name ' +test_expect_success 'push to existing branch, upstream configured with same name' ' + git remote add origin repo1 && + git checkout -t -b local-tracking master && + test_commit ten && + test_push_success current local-tracking +' + test_done -- 1.8.3.rc1.579.g184e698