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

[PATCH 0/2] Fix fsck --name-objects bug

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 10, 2021, 18:01 UTC
Message-ID
<pull.874.git.1612980090.gitgitgadget@gmail.com>

As described in https://github.com/gitgitgadget/git/pull/873, I managed to corrupt my Git checkout in a rather thorough manner yesterday, and it took me a long time to undo the damage. One of my tools for that should have been git fsck --name-objects, but that command produced bogus output: It said that a commit with the name ~2 had a missing tree, but ~2 is not even a legal rev name.

Turns out that this is an ancient bug, and the fact that nobody complained about it suggests to me that the --name-objects probably has exactly one user, and he uses it only every four years, when he manages to hose his Git checkout.

Johannes Schindelin (2):
  t1450: robustify `remove_object()`
  fsck --name-objects: be more careful parsing generation numbers
 fsck.c          |  5 +++++
 t/t1450-fsck.sh | 26 ++++++++++++--------------
 2 files changed, 17 insertions(+), 14 deletions(-)
base-commit: 7397ca33730626f682845f8691b39c305535611e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-874%2Fdscho%2Ffix-fsck-name-objects-generation-parsing-bug-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-874/dscho/fix-fsck-name-objects-generation-parsing-bug-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/874
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 7 in “Fix fsck --name-objects bug”
  1. 0/2 Fix fsck --name-objects bugJohannes Schindelin via GitGitGadget, Feb 10, 2021
  2. 1/2 t1450: robustify `remove_object()`Johannes Schindelin via GitGitGadget, Feb 10, 2021
  3. Junio C HamanoFeb 10, 2021
  4. Taylor BlauFeb 10, 2021
  5. Junio C HamanoFeb 11, 2021
  6. 2/2 fsck --name-objects: be more careful parsing generation numbersJohannes Schindelin via GitGitGadget, Feb 10, 2021
  7. Junio C HamanoFeb 10, 2021

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.