Re: [RFC/PATCH] Introduce remote.pushdefault
From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:25
Sorry about the horribly late response- I just got around to re-rolling this, and had a doubt. Junio C Hamano [off-list ref] wrote:
Ramkumar Ramachandra [off-list ref] writes:quoted
diff --git a/Documentation/config.txt b/Documentation/config.txt index 9b11597..82a4a78 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt@@ -1884,6 +1884,10 @@ receive.updateserverinfo:: If set to true, git-receive-pack will run git-update-server-info after receiving data from git-push and updating refs. +remote.pushdefault:: + The remote to push to by default. Overrides the + branch-specific configuration `branch.<name>.remote`.It feels unexpected to see "I may have said while on this branch I push there and on that branch I push somewhere else, but no, with this single configuration I'm invalidating all these previous statements, and all pushes go to this new place". Shouldn't the default be the default that is to be overridden by other configuration that is more specific? That is, "I would normally push to this remote and unless I say otherwise that is all I have to say, but for this particular branch, I push to somehwere else".
I'm a little confused as to where this configuration variable will be useful. On a fresh clone from Github, I get branch.master.remote configured to "origin". How will adding remote.pushdefault have any impact, unless I explicitly remove this branch-specific remote configuration? Besides, without branch.<name>.remote configured, I can't even pull and expect changes to be merged. So, really: what is the use of remote.pushdefault? I'm dropping this patch, and just going with branch.<name>.pushremote, unless you convince me otherwise.