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

Re: [PATCH] Add a 'generation' number to commits

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 15, 2011, 19:49 UTC
Message-ID
<7v8vrz1g02.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.02.1107141126300.4159@i5.linux-foundation.org>
> Comments? This is pretty simplistic, and yes, it's slow. On the kernel, it 
> now takes a few seconds to generate a new commit when there are no 
> generation numbers - and that's on a fast machine.

I agree this is the way to go if we _were_ to use generation number associated with commit objects in the longer term, and if the SLOP logic in still_interesting() in revision.c:

 (1) can gracefully fall back to the date based heuristics for older
     commits without the header; and
 (2) can take advantage of the generation numbers in more recent commit.

If we cannot do (1), we could augment this with Peff's generation number cache. I suspect (1) is doable and in that case we do not have to have (and we may be better off without) the on-disk cache that could go stale, but nobody so far has shown that yet, so...

As I mentioned in a review comment of the actual patch, I however am not convinced that generation number is a better substitute for the timestamp in the context of "tag --contains" optimization.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 of 4 in “Add a 'generation' number to commits”
  1. Add a 'generation' number to commitsLinus Torvalds, Jul 14, 2011
  2. Junio C HamanoJul 15, 2011
  3. Linus TorvaldsJul 15, 2011
  4. Junio C HamanoJul 16, 2011

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.