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

Re: [PATCH 0/3] commit-graph: fix corruption during generation v2 upgrade

From
Taylor Blau <me@ttaylorr.com>
Date
Jul 15, 2022, 02:02 UTC
Message-ID
<YtDKmo72LgqzEycD@nand.local>
In-Reply-To
<xmqqk08gdi5i.fsf@gitster.g>
On Wed, Jul 13, 2022 at 10:41:45AM -0700, Junio C Hamano wrote:
> Thanks.  Do we know where this breaks?  Applying [1/3] on Git 2.32,
> 2.34, and 2.35 seems to claim that "known breakage vanished".
With a script like:

--- >8 --- #!/bin/sh

set -e

rm -fr repo git init -q repo cd repo

echo "x" >x
git add x
GIT_AUTHOR_DATE="@2 +0000" \
  GIT_COMMITTER_DATE="@2 +0000" git commit -q -m "$(cat x)"
git repack -d -q
git.compile -c commitGraph.generationVersion=1 commit-graph write
git.compile -c commitGraph.generationVersion=2 commit-graph write \
  --changed-paths

git.compile rev-list --all --- 8< ---

You can bisect it to 3b0199d4c3 (commit-graph: start parsing generation v2 (again), 2022-03-01), but only because that patch teaches Git to recognize the existence of the generation v2 chunks.

I suspect (but haven't confirmed) that it was probably broken before 3b0199d4c3. But such breakage wouldn't have mattered, since despite understanding generation v2, previous versions of Git never read those chunks, which would have masked over this bug.

Thanks, Taylor

Previous: Junio C HamanoNext: Derrick Stolee
Message 11 of 12 in “commit-graph: fix corruption during generation v2 upgrade”
  1. 0/3 commit-graph: fix corruption during generation v2 upgradeTaylor Blau, Jul 12, 2022
  2. 1/3 t5318: demonstrate commit-graph generation v2 corruptionTaylor Blau, Jul 12, 2022
  3. Derrick StoleeJul 15, 2022
  4. Taylor BlauJul 15, 2022
  5. Junio C HamanoJul 16, 2022
  6. Taylor BlauJul 16, 2022
  7. 2/3 commit-graph: introduce `repo_find_commit_pos_in_graph()`Taylor Blau, Jul 12, 2022
  8. Derrick StoleeJul 15, 2022
  9. 3/3 commit-graph: fix corrupt upgrade from generation v1 to v2Taylor Blau, Jul 12, 2022
  10. Junio C HamanoJul 13, 2022
  11. Taylor BlauJul 15, 2022
  12. Derrick StoleeJul 15, 2022

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.