Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: diff against a tag ?

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:41:55


On Thu, 28 Apr 2005, Junio C Hamano wrote:
Depends on your definition of today, but with the patch below I
sent today, you can say "diff-tree -p $tag $(cat .git/HEAD)".
I think Dave was wondering how to _find_ the tag in the first place, which 
is a different issue.

Right now fsck is the only thing that reports tags that aren't referenced 
some other way. Once you know the tag, things are easy - even without 
Junio's patch you can just do

	object=$(cat-file tag $tag | sed 's/object //;q')

and then you can just do

	diff-tree $object $(cat .git/HEAD)

or whatever you want to do.

Dave: do a "fsck --tags" in your tree, and it will talk about the tags it
finds. Then you can create files like .git/refs/tags/v2.6.12-rc2 that
contain pointers to those tags..

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help