Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:08

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help