Re: [RFD] what should "git push remote.host:path" do?
- From
Sean <seanlkml@sympatico.ca>
- Date
- Jan 12, 2006, 10:18 UTC
- Message-ID
- <BAYC1-PASMTP099ED34B41FFA02EDEEF25AE270@CEZ.ICE>
- In-Reply-To
- <7vslrtq05h.fsf@assigned-by-dhcp.cox.net>
On Thu, January 12, 2006 4:13 am, Junio C Hamano said:
> The underlying "git send-pack remote.host:path" pushes all the > matching refs that both local and remote has, and "git push" > blindly inherits this property.
[snip]
Show 9 quoted lines
> Unlike pull that can happen pretty much promiscuously, people > will push into the same set of a limited number of remote > repositories repeatedly over the life of the project, so it is > reasonable to assume they would want to keep a $GIT_DIR/remotes/ > entry for those repositories to save typing. Then always > requiring one or more refspecs for push is not too much to ask > for. > > Opinions?
What about assuming a refspec of "current-branch:current-branch" ? That is, if the branch name that is currently checked out locally also exists upstream, push into it (only if fast forward).
This should allow multiple branches to be updated locally, and pushed upstream selectively. If you force all push-refspecs to be listed in a remotes file, they'll all be updated every time you push and you'd lose the ability to push just one branch upstream without resorting to multiple $GIT_DIR/remotes/ entries.
Sean