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

Re: Git commit generation numbers

From
Jeff King <peff@peff.net>
Date
Jul 14, 2011, 20:07 UTC
Message-ID
<20110714200717.GF26918@sigill.intra.peff.net>
In-Reply-To
<CA+55aFzuQnfo1iywnp-WAajMHe2+6_HOM85aw0bS+p0xv5RyhA@mail.gmail.com>
On Thu, Jul 14, 2011 at 12:51:39PM -0700, Linus Torvalds wrote:
Show 10 quoted lines
> On Thu, Jul 14, 2011 at 12:46 PM, Ted Ts'o <tytso@mit.edu> wrote:
> >
> > Would it be considered evil if we put the generation number in the
> > pack, but not consider it part of the formal object (i.e., it would be
> > just a cache, but one that wouldn't change once the pack was created)?
> 
> That would actually be a major change to data structures, and would
> require some serious surgery and be hard to support in a
> backwards-compatible way (think different git versions accessing the
> same repository).

If we put it in the index, but not the pack, then it wouldn't be any more painful than pack index v2. I don't recall there being huge fallout from that; we just gave a reasonable deprecation period before switching it on as the default.

I'm not sure it is much less crappy than having the cache in a separate file. It does take less space, since the pack index already contains all of the sha1s. But if we don't like the on-the-fly writing of what was in my series, it would not be hard to generate the same cache during pack-index time. Not having it in a separate file makes it hard to invalidate the cache when the graph changes (due to grafts or replace refs). But maybe we don't care about that. Or maybe it's OK to tell the user to manually rebuild the pack index if they tweak those features.

-Peff
Previous: Linus TorvaldsNext: Ted Ts'o
Message 8 of 47 in “Git commit generation numbers”
  1. Linus TorvaldsJul 14, 2011
  2. Jeff KingJul 14, 2011
  3. Linus TorvaldsJul 14, 2011
  4. Linus TorvaldsJul 14, 2011
  5. Jeff KingJul 14, 2011
  6. Ted Ts'oJul 14, 2011
  7. Linus TorvaldsJul 14, 2011
  8. Jeff KingJul 14, 2011
  9. Ted Ts'oJul 14, 2011
  10. Jeff KingJul 14, 2011
  11. Linus TorvaldsJul 14, 2011
  12. Jeff KingJul 14, 2011
  13. Linus TorvaldsJul 14, 2011
  14. Jeff KingJul 14, 2011
  15. Linus TorvaldsJul 15, 2011
  16. Geert BoschJul 15, 2011
  17. Jeff KingJul 15, 2011
  18. Linus TorvaldsJul 15, 2011
  19. Shawn PearceJul 15, 2011
  20. Linus TorvaldsJul 15, 2011
  21. Ted Ts'oJul 15, 2011
  22. Linus TorvaldsJul 15, 2011
  23. Christian CouderJul 16, 2011
  24. Jeff KingJul 18, 2011
  25. Christian CouderJul 19, 2011
  26. Jeff KingJul 19, 2011
  27. Christian CouderJul 21, 2011
  28. Tony LuckJul 15, 2011
  29. Linus TorvaldsJul 15, 2011
  30. Jeff KingJul 15, 2011
  31. Jeff KingJul 15, 2011
  32. Linus TorvaldsJul 15, 2011
  33. Jeff KingJul 15, 2011
  34. Linus TorvaldsJul 15, 2011
  35. Linus TorvaldsJul 15, 2011
  36. Linus TorvaldsJul 15, 2011
  37. Jeff KingJul 16, 2011
  38. Jeff KingJul 16, 2011
  39. Jakub NarebskiJul 15, 2011
  40. Long, MartinJul 15, 2011
  41. Long, MartinJul 15, 2011
  42. Drew NorthupJul 15, 2011
  43. Linus TorvaldsJul 14, 2011
  44. Jakub NarebskiJul 14, 2011
  45. Junio C HamanoJul 14, 2011
  46. Jeff KingJul 14, 2011
  47. Junio C HamanoJul 14, 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.