Re: [PATCH 4/4] describe/name-rev: tell name-rev to peel the incoming object to commit first
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jul 9, 2013, 12:42 UTC
- Message-ID
- <CALkWK0mJCGN3SzXTBksgeDZnA=bvEi-yeLn0mT_X9Z0o805+bw@mail.gmail.com>
- In-Reply-To
- <7vr4f8vtwc.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> $ git describe $(git rev-parse v1.8.3) > v1.8.3 > $ git describe --contains $(git rev-parse v1.8.3) > v1.8.3^0
This is a correct observation, and I've already submitted the correct fix: "name-rev: strip trailing ^0 in when --name-only".
Show 9 quoted lines
> $ git describe --contains $(git rev-parse v1.8.3) a717d9e > v1.8.3^0 > v1.8.3.1~9 > > and these are internally consistent (they both roundtrip via > rev-parse). Stripping "^0" from the former will break the > consistency, even though it may make the output look prettier, but > the "--contains" output is not even meant to be "pretty" in the > first place.
Incorrect. The "--contains" output _is_ meant to be pretty. That's the whole reason name-rev --name-only was invented.
[2/4] is correct in that it fixes --stdin for annotated tags (although the implementation could be simpler, and the commit message is completely misleading).