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

Re: repack might cause having when commit objects are missing

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Feb 9, 2009, 09:13 UTC
Message-ID
<20090209091303.GA1320@atjola.homenet>
In-Reply-To
<20090209022642.GA19413@atjola.homenet>
[topic fixed to resemble something sane...]
On 2009.02.09 03:26:42 +0100, Björn Steinbrink wrote:
> Up to now, I don't have a small reproduction case yet and unfortunately
> I can't make the repo with which I've seen the failure available.

Not a self-contained reproduction test, but at least it shows the problem with a public repo. Assuming you have no refs referencing a0325eb^

In a clone of git.git add to .git/info/grafts: a0325eb2e982e25376e4cb89ebcac5d8d703548d 604dd0a0782b3e33bcc397c27e811ebc019c9f5a

Then: git reflog expire --expire=0 --all git repack -ad rm .git/info/grafts git repack -ad

The second repack wrecks the repo:

doener@atjola:git2 (master) $ cp /home/doener/grafts .git/info/ doener@atjola:git2 (master) $ git reflog expire --expire=0 --all doener@atjola:git2 (master) $ git repack -ad Counting objects: 92161, done. Delta compression using 4 threads. Compressing objects: 100% (23481/23481), done. Writing objects: 100% (92161/92161), done. Total 92161 (delta 67185), reused 92061 (delta 67092) doener@atjola:git2 (master) $ rm .git/info/grafts doener@atjola:git2 (master) $ git repack -ad error: Could not read c0e2e12fa0babcc4ab28b95bc5ad4f86e139d6b4 Counting objects: 3195, done. Delta compression using 4 threads. Compressing objects: 100% (2245/2245), done. Writing objects: 100% (3195/3195), done. Total 3195 (delta 1263), reused 2418 (delta 886) error: refs/heads/rebase does not point to a valid object! [dozens of more broken refs]

Note how in the second repack, the walking machniery finds only 3195 objects, as opposed to more than 92k before.

I've also tried with threaded delta search disabled (pack.threads=1), no difference.

Björn
Previous: Björn SteinbrinkNext: Björn Steinbrink
Message 2 of 4 in “"repack" when a needed commit object missing "kills" the repo”
  1. Björn SteinbrinkFeb 9, 2009
  2. Björn SteinbrinkFeb 9, 2009
  3. Björn SteinbrinkFeb 9, 2009
  4. revision traversal and pack: notice and die on missing commitJunio C Hamano, Feb 11, 2009

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.