Re: [RFC PATCH] push: start warning upcoming default change for push.default
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:17
Junio C Hamano [off-list ref] writes:
Jeff King [off-list ref] writes:quoted
... This is not a push.default issue, but I think it is somewhat related, and maybe worth discussing along with the topic of asymmetry. ... I've mostly trained my fingers to type "git push <my-publish-repo>", but I do occasionally forget.In an assymmetric set-up, you would typically push into one place but update from one or more places, so it might make sense to make it easier to say "git push" and "git pull $there". But that does not solve the fundamental issue, I would think.quoted
Do other people with asymmetric workflows find this annoying? Do they not care? Or are many fewer people doing asymmetric things than I think?I think it is not "they do not care", but "they do not have a good solution". I do not think of anything offhand, either.
Actually, we could introduce branch.$name.pushRemote that overrides branch.$name.remote only for pushes. Before anybody makes an ill-conceived comment, remote.$name.pushURL is not to be used for this purpose. It is only about how to get to the named remote repository, and git still considers remote.$name to be logically the same remote. "git push" into the named remote will still update the remote tracking branch that we would update if we were to immediately turn around and run "git fetch" from that same remote, and abusing remote.$name.pushURL for triangular setup will not give us a correct behaviour.