From: Ryan Anderson Date: Tue, 27 Sep 2005 17:34:45 GMT Subject: Re: Cogito: cg-clone doesn't like packed tag objects Message-ID: <20050927173445.GC23034@mythryan2.michonline.com> In-Reply-To: On Tue, Sep 27, 2005 at 08:34:22AM -0700, Linus Torvalds wrote: > 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