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

Re: [RFC][GSoC] Implement Generation Number v2

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2020, 16:04 UTC
Message-ID
<xmqqtv2f5a6x.fsf@gitster.c.googlers.com>
In-Reply-To
<86mu87qj92.fsf@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> About moving commit data with generation number v2 to "CDA2" chunk: if
> "CDAT" chunk is missing then (I think) old Git would simply not use
> commit-graph file at all; it may crash, but I don't think so.  If "CDAT"
> chunk has zero length... I don't know what would happen then, possibly
> also old Git would simply not use commit-graph data at all.

Yeah, if it makes it crash, then we cannot use that "missing CDAT" approach.

Show 8 quoted lines
> Putting generation number v2 into separate chunk (which might be called
> "GEN2" or "OFFS"/"DOFF") has the disadvantage of increasing the on disk
> size of the commit graph, and possibly also increasing memory
> consumption (the latter depends on how it would be handled), but has the
> advantage of being fullly backward compatibile.  Old Git would simply
> use generation numbers v1 in "CDAT", new Git would use generation
> numbers v2 in "OFFS" -- combining commit creation date from "CDAT" and
> offset from "OFFS"),

Do we have an option *not* to record meaningful generation numbers in CDAT and have the current Git binaries understand and still use the rest of the graph file, while not using the optimizations that rely on having generation numbers? If not, then the new version of Git that tries to be compatible with old one needs to compute both generation numbers, and we would need to keep the topological number for quite some time.

> and there should be no problems with updating
> commit-graph file (either rewriting, or adding new commit-graph to the
> chain).

Would merging by the current Git also work well (meaning, would "GEN2" or whatever it does not understand be omitted)?

Thanks.
Previous: Jakub NarebskiNext: Jakub Narebski
Message 9 of 12 in “[RFC][GSoC] Implement Generation Number v2”
  1. Abhishek KumarMar 22, 2020
  2. Jakub NarebskiMar 22, 2020
  3. Abhishek KumarMar 23, 2020
  4. Junio C HamanoMar 23, 2020
  5. Abhishek KumarMar 23, 2020
  6. Jakub NarebskiMar 23, 2020
  7. Derrick StoleeMar 23, 2020
  8. Jakub NarebskiMar 24, 2020
  9. Junio C HamanoMar 23, 2020
  10. Jakub NarebskiMar 24, 2020
  11. Junio C HamanoMar 24, 2020
  12. [GSoC][Proposal v2] Implement Generation Number v2Abhishek Kumar, Mar 26, 2020

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.