Re: diff against a tag ?
- From
- Dave Jones <davej@redhat.com>
- Date
- Apr 28, 2005, 22:06 UTC
- Message-ID
- <20050428220626.GC15706@redhat.com>
- In-Reply-To
- <Pine.LNX.4.58.0504281358060.18901@ppc970.osdl.org>
On Thu, Apr 28, 2005 at 02:01:40PM -0700, Linus Torvalds wrote: > > > 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.
Indeed. Sorry if I was unclear.
> 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..
Groovy. Is it 'THE LAW' that the first one it reports will always be the most recent tag ?
Hmm, in a fresh rsync from your kernel tree, I get this.. tagged commit a2755a80f40e5794ddc20e00f781af9d6320fafb (v2.6.12-rc3) in 0397236d43e48e821cce5bbe6a80a1a56bb7cc3a tagged commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (v2.6.12-rc2) in 9e734775f7c22d2f89943ad6c745571f1930105f expect dangling commits - potential heads - due to lack of head information dangling tag 0397236d43e48e821cce5bbe6a80a1a56bb7cc3a dangling commit 9acf6597c533f3d5c991f730c6a1be296679018e dangling tag 9e734775f7c22d2f89943ad6c745571f1930105f
Is that last part to be expected ?
Dave