Re: [PATCH] Documentation: add a planning document for the next CLI revamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Oct 2008, Pierre Habouzit wrote:

> On Thu, Oct 30, 2008 at 02:59:28PM +0000, Mike Hommey wrote:
> > On Thu, Oct 30, 2008 at 07:52:53AM -0700, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:
> > > +1 to Nico's NAK.
> > > 
> > > Although I was at the GitTogether I don't remember this change to
> > > checkout being discussed.  I must have been asleep reading email
> > > or something.  I am _NOT_ in favor of this change; I think the
> > > current behavior of "git checkout origin/master" is correct and as
> > > sane as we can make it.
> > 
> > Except he was talking about 'git checkout branch', not 'git checkout
> > origin/branch'. And I would be fine with 'git checkout branch' doing
> > what 'git checkout -b branch $remote/branch' does if $remote is unique
> > (i.e. there is no other 'branch' branch in any other remote) and the
> > 'branch' branch doesn't already exist.
> 
> Seconded.
> 
> Having git-checkout $foo being a shorthand for git checkout -b $foo
> origin/$foo when origin/$foo exists and $foo doesn't is definitely handy.

No.  This is only the first step towards insanity.

In many cases origin/$foo == origin/master so this can't work in that 
case which is, after all, the common case.  Therefore I think this is 
wrong to add magic operations which are not useful for the common case 
and actively _hide_ how git actually works.  Not only will you have to 
explain how git works anyway for that common origin/master case, but 
you'll also have to explain why sometimes the magic works and sometimes 
not.  Please keep such convenience shortcuts for your own scripts and/or 
aliases.


Nicolas
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux