Re: [RFC/PATCH] push: introduce implicit push
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Apr 14, 2013, 08:33 UTC
- Message-ID
- <516A69E3.2090805@gmail.com>
- In-Reply-To
- <7vehed7ilu.fsf@alter.siamese.dyndns.org>
W dniu 14.04.2013 06:42, Junio C Hamano pisze:
Show 16 quoted lines
> I personally think it is much more sellable to use an even simpler > rule than what Jeff suggested, to make > > git push -- <refspec> > > go to the remote.pushdefault (falling back to remote.default that is > "origin"), without even paying attention to what branch you are on, > and ignoring branch.*.remote/pushremote configuration. > > That is sufficient to support the triangular, the publish-to-mine, > and the centralized workflows, no? In any of these cases, the > repository you push out to is _one_, even though it may be a > different one from where you pull from. If you have a very special > branch that goes to a different place than all the other branches, > you can always push out while on that branch without any refspec, > anyway.
I think it also supports users of 'matching' that have push default correctly configured. Currently they can use "git push" in all cases but first push of a branch, where they had to use "git push origin branch", or "git push pushremote branch", and with those changes can now simply use "git push -- branch".
Nice.
Here I think simpler is better, especially that diferent users have different expectations: push to remote based on current branch or push to remote or remotes based on branch or branches being pushed.
-- Jakub Narębski