git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: diff against a tag ?

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 28, 2005, 22:22 UTC
Message-ID
<Pine.LNX.4.58.0504281518100.18901@ppc970.osdl.org>
In-Reply-To
<20050428220626.GC15706@redhat.com>
On Thu, 28 Apr 2005, Dave Jones wrote:
>
> Groovy. Is it 'THE LAW' that the first one it reports will always be
> the most recent tag ?

Nope. They are reported in the order they are found, which is not meaningful at all (it depends on the directory ordering, with the highest-level bits being obviously ordered by the sha1 number thanks to the subdirectory stuff).

So you can only see the name of the tag - there's no ordering. The tag-name may of course imply an ordering in itself..

Show 9 quoted lines
> 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 ?
It even says so: "expect dangling commits".

The tags will always be dangling, since nothing refers to them. Once you have them listed in your tag database (ie you've created files that mention them in .git/refs/tags or something), you can tell fsck about them, and fsck won't complain.

Something like
	fsck-cache --unreachable $(cat .git/refs/*/*)
would do it (and depending on exactly how cogito ends up recording them).
		Linus
Previous: Dave JonesNext: Dave Jones
Message 6 of 9 in “diff against a tag ?”
  1. Dave JonesApr 28, 2005
  2. Junio C HamanoApr 28, 2005
  3. Linus TorvaldsApr 28, 2005
  4. Junio C HamanoApr 28, 2005
  5. Dave JonesApr 28, 2005
  6. Linus TorvaldsApr 28, 2005
  7. Dave JonesApr 28, 2005
  8. Morten WelinderApr 28, 2005
  9. Linus TorvaldsApr 28, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.