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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Wed Sep 28 03:35:27 2005
This archive was generated by hypermail 2.1.8 : 2005-09-28 03:35:30 EST