Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-12-04 Thread Kaartic Sivaraam
On Tuesday 05 December 2017 12:14 AM, Junio C Hamano wrote: Kaartic Sivaraam writes: Stepping back a bit, the mild suspicion above says $ git checkout HEAD^0 ... do things ... $ git checkout -b temp ... do more things ... $ git checkout -B

Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-12-04 Thread Junio C Hamano
Kaartic Sivaraam writes: >> Stepping back a bit, the mild suspicion above says >> >> $ git checkout HEAD^0 >> ... do things ... >> $ git checkout -b temp >> ... do more things ... >> $ git checkout -B @{-1} >> >> that creates a new branch whose

Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-12-04 Thread Kaartic Sivaraam
On Sat, 2017-12-02 at 17:52 -0800, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > > > I have a mild suspicion that "git checkout -B @{-1}" would want to > > > error out instead of creating a valid new branch whose name is > > > 40-hex that happen to be the name

Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-12-02 Thread Junio C Hamano
Kaartic Sivaraam writes: >> I have a mild suspicion that "git checkout -B @{-1}" would want to >> error out instead of creating a valid new branch whose name is >> 40-hex that happen to be the name of the commit object you were >> detached at previously. > > I thought

Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-11-28 Thread Kaartic Sivaraam
On Tue, 2017-11-28 at 11:40 +0900, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > > When the N-th previous thing checked out sytax is used with > > '--branch' option of check-ref-format the results might not > > always be a valid branch name > > I wonder if you

Re: [PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-11-27 Thread Junio C Hamano
Kaartic Sivaraam writes: > When the N-th previous thing checked out sytax is used with > '--branch' option of check-ref-format the results might not > always be a valid branch name I wonder if you want to rephrase this, because 40-hex object name is syntactically a

[PATCH v2 2/2] Doc/check-ref-format: clarify information about @{-N} syntax

2017-11-27 Thread Kaartic Sivaraam
When the N-th previous thing checked out sytax is used with '--branch' option of check-ref-format the results might not always be a valid branch name as @{-N} is used to refer to the N-th last checked out "thing" which might be any commit (sometimes a branch). The documentation thus does a wrong