Re: [PATCH 2/4] name-rev: allow converting the exact object name at the tip of a ref
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jul 8, 2013, 12:20 UTC
- Message-ID
- <CALkWK0kSqaMrD_YuT8OxLo8yLEc0APd2Ca7FapKstqqmcYbC7A@mail.gmail.com>
- In-Reply-To
- <1373236424-25617-3-git-send-email-gitster@pobox.com>
Junio C Hamano wrote:
Show 7 quoted lines
> "git name-rev" is supposed to convert 40-hex object names into > strings that name the same objects based on refs, that can be fed to > "git rev-parse" to get the same object names back, so > > $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin > 8af06057d0c31a24e8737ae846ac2e116e8bafb9 > edca4152560522a431a51fc0a06147fc680b5b18 (tags/v1.8.3^0)
Wait, what?
$ git name-rev 8af060 8af060 tags/v1.8.3^0
Isn't this a failure specific to --stdin?
Show 5 quoted lines
> Teach it to show this instead: > > $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin > 8af06057d0c31a24e8737ae846ac2e116e8bafb9 (tags/v1.8.3) > edca4152560522a431a51fc0a06147fc680b5b18 (tags/v1.8.3^0)
Wait, what is name-rev?
Finds symbolic names suitable for human digestion for revisions given in any format parsable by git rev-parse.
It is meant to name _revisions_ (aka. commits): in that context, what sense does it make to distinguish between tags/v1.8.3 and tags/v1.8.3^0?