Re: [PATCH v3 1/2] checkout: allow dwim for branch creation for "git checkout $branch --"

2013-10-17 Thread Junio C Hamano
Matthieu Moy writes: > diff --git a/builtin/checkout.c b/builtin/checkout.c > index 0f57397..9edd9c3 100644 > --- a/builtin/checkout.c > +++ b/builtin/checkout.c > @@ -863,6 +863,13 @@ static const char *unique_tracking_name(const char > *name, unsigned char *sha1) > return NULL; > } >

[PATCH v3 1/2] checkout: allow dwim for branch creation for "git checkout $branch --"

2013-09-26 Thread Matthieu Moy
The "--" notation disambiguates files and branches, but as a side-effect of the previous implementation, also disabled the branch auto-creation when $branch does not exist. A possible scenario is then: git checkout $branch => fails if $branch is both a ref and a file, and suggests -- git checkou