Re: Cogito: cg-clone doesn't like packed tag objects
- From
- Ryan Anderson <ryan@michonline.com>
- Date
- Sep 27, 2005, 17:34 UTC
- Message-ID
- <20050927173445.GC23034@mythryan2.michonline.com>
- In-Reply-To
- <Pine.LNX.4.58.0509270821590.3308@g5.osdl.org>
On Tue, Sep 27, 2005 at 08:34:22AM -0700, Linus Torvalds wrote:
Show 9 quoted lines
> On Tue, 27 Sep 2005, Ryan Anderson wrote: > > > > git-rev-parse $tagname^0 > > You need "--verify". Otherwise git-rev-parse will think that you just have > a strange filename or other random thing: > > prompt$ git-rev-parse 000^0 > 000^0
Hmm:
$ cat .git/refs/tags/v2.6.13-rc4 7eab951de91d95875ba34ec4c599f37e1208db93 $ git-rev-parse v2.6.13-rc4 7eab951de91d95875ba34ec4c599f37e1208db93 $ git-rev-parse v2.6.13-rc4^0 63953523341bcafe5928bf6e99bffd7db94b471e $ git-rev-parse 63953523341bcafe5928bf6e99bffd7db94b471e^0 63953523341bcafe5928bf6e99bffd7db94b471e
# The typo that demonstrates what you did: $ git-rev-parse 7eab951de91d95875ba34ec4c599f37e1208db93^- 7eab951de91d95875ba34ec4c599f37e1208db93^-
$ git-rev-parse 7eab951de91d95875ba34ec4c599f37e1208db93^0 63953523341bcafe5928bf6e99bffd7db94b471e
So I think --verify is beneficial if you want errors returned, but if you know you have real tags or commits, git-rev-parse without the --verify seems to do the right thing.
Or, at the very least, in the case where I used this (linux/scripts/setlocalversion), this behavior is fine.
-- Ryan Anderson sometimes Pug Majere