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

Bug report: git cat-file -e / rev-list disagree with git fsck on empty tree

From
AAAnish R Athalye <aathalye@mit.edu>
Date
Sep 2, 2020, 00:27 UTC
Message-ID
<1006A7F3-8C48-46E3-8F7C-3F82181E3619@mit.edu>

This is related to the change made in f06ab027efd2 (rev-list: allow cached objects in existence check).

That patch seemed designed to allow the workflow where the empty tree is missing from the object store, so `git cat-file -e 4b825dc642cb6eb9a060e54bf8d69288fbee4904` and `git rev-list --objects 4b825dc642cb6eb9a060e54bf8d69288fbee4904` both return success even when the object is not physically present.

However, in the same situation:
    $ git fsck
    [...]
    missing tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904

I'm not sure if this is the intended behavior (the tree is indeed missing, so in some sense, this is reasonable). But it seems somewhat confusing that it disagrees with the interrogation commands.

Next: Junio C Hamano
Message 1 of 2 in “Bug report: git cat-file -e / rev-list disagree with git fsck on empty tree”
  1. Anish R AthalyeSep 2, 2020
  2. Junio C HamanoSep 2, 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.