Thread (11 messages) flat view 11 messages, 6 authors, 2016-06-15

Re: Cogito: cg-clone doesn't like packed tag objects

From: Ryan Anderson <hidden>
Date: 2016-06-15 22:42:07

On Tue, Sep 27, 2005 at 08:34:22AM -0700, Linus Torvalds wrote:
On Tue, 27 Sep 2005, Ryan Anderson wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help