Re: [RFD] what should "git push remote.host:path" do?
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jan 12, 2006, 18:10 UTC
- Message-ID
- <Pine.LNX.4.64.0601121006040.3535@g5.osdl.org>
- In-Reply-To
- <7vslrtq05h.fsf@assigned-by-dhcp.cox.net>
On Thu, 12 Jan 2006, Junio C Hamano wrote:
Show 6 quoted lines
> > Nevertheless, exposing the default behaviour of "git send-pack" > to "git push" was probably a mistake. I'd propose to require at > least one refspec to be specified, either on the command line or > via $GIT_DIR/remotes mechanism. So my answer to the "Subject: " > line question is "Barf".
Well, I don't have objections, but from ym usage schenario, I'd at least then want flags for "all tags" (--tags - like "pull") and "all branches" (--all).
Having to list all tags/branches is slightly painful. I currently push out all my tags with
./push-all $(cd .git/refs ; find -type f tags)
which works but isn't exactly user-friendly ("push-all" is just a script that uses "git push" to push to multiple repositories).
Show 7 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.
Well, especially if you want to use "git push" to basically back up your own repo, you do want the "--all" flag. Otherwise you will then forget to add a branch name to every remotes file whenyou create a new branch.
Linus