[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH] checkout --track: make up a sensible branch name if '-b'
From:       Johannes Schindelin <Johannes.Schindelin () gmx ! de>
Date:       2008-08-10 22:58:05
Message-ID: alpine.DEB.1.00.0808110058360.24820 () pacific ! mpi-cbg ! de ! mpi-cbg ! de
[Download RAW message or body]

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic