Re: [PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-08 Thread Ramkumar Ramachandra
Junio C Hamano wrote: But I do not think name-rev is limited to commits, in the sense that you would see this: $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin 8af06057d0c31a24e8737ae846ac2e116e8bafb9 edca4152560522a431a51fc0a06147fc680b5b18 (tags/v1.8.3^0) The second

[PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Ramkumar Ramachandra
236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, one of the primary objectives of --name-only was to make the output of name-rev match that of describe.

Re: [PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: 236157 (Teach git-describe how to run name-rev, 2007-05-21) introduced `git name-rev --name-only`, with the intent of using it to implement `git describe --contains`. According to the message, one of the primary objectives of --name-only was to

Re: [PATCH 2/3] name-rev: strip trailing ^0 in when --name-only

2013-07-07 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: WRT describe --contains, I do agree that both of these $ git describe $(git rev-parse v1.8.3^0) $ git describe --contains $(git rev-parse v1.8.3^0) should just say v1.8.3 without ~0/^0/~0~0~0 etc. and the last example you showed