Re: Cleaning up git user-interface warts
- From
Petr Baudis <pasky@suse.cz>
- Date
- Nov 16, 2006, 02:43 UTC
- Message-ID
- <20061116024321.GP7201@pasky.or.cz>
- In-Reply-To
- <ejeq20$5hn$1@sea.gmane.org>
On Wed, Nov 15, 2006 at 11:28:27AM CET, Jakub Narebski wrote:
Show 15 quoted lines
> Santi Béjar wrote: > > > On 11/15/06, Jakub Narebski <jnareb@gmail.com> wrote: > > >> You mean > >> > >> git merge git://repo.com/time_machine.git#branch > >> > >> don't you (perhaps with 'master' as default branch)? > > > > perhaps with remote 'HEAD' as default branch? > > No! HEAD might change without your notice, and you want to know > which branch you merge. With remotes the default could be first > branch in the pull/fetch list, but with bare URL...
No! If HEAD changed without your notice, it means that the remote repository admin _wants_ you to start fetching another branch now. Imagine a setup of these branches:
phooey-1.2 legacy lineage phooey-2.0 last stable phooey-3.0 current development (no releases yet) phooey-4.0 stash for futuristic functionality, heavily experimental
In this case, HEAD now points to phooey-3.0 but when it becomes stable, it would change to phooey-4.0.
The common practice of having 'master' pointing on whatever you currently have now and and "cutting out" the branches from it at random times is something heavily influenced by CVS where this is the only sane way of branching (the cutting out even hardcoded in numbering scheme). In more advanced systems, you may want to be much more flexible wrt. this (note that I'm not saying you necessarily _should_ be).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1