Re: [PATCH] checkout --track: make up a sensible branch name if '-b' was omitted

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

 



Hi,

On Sat, 9 Aug 2008, Pieter de Bie wrote:

> Changing the behaviour to mean "git checkout -b origin/master master" 
> will change the meaning, but who uses -b with an existing remote branch 
> anyway?

FWIW I am totally opposed to this kind of reasoning.  I consider it sloppy 
to make assumptions that might or might not be true, and to force 
a change that might be convenient to you, but is likely to hurt others.

Besides, your suggestion completely breaks consistency.  If somebody asks 
to name a new branch "origin/master" (and "-b origin/master" is _just_ 
_that_), then it is not Git's job to fix the user's mistake.  Just like it 
is not Git's job to fix when somebody said "git commit", but meant "git 
push".

After all, I might _want_ to create a local branch "origin/master", and 
you would just break the valid assumption that "-b origin/master" would do 
that for me.

Hth,
Dscho

--
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