Skip to content

Fix fsck --name-objects bug

Johannes Schindelin via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t1450: robustify `remove_object()`t/t1450-fsck.sh+6 -103 replies
2/2fsck --name-objects: be more careful parsing generation numbersfsck.c t/t1450-fsck.sh+11 -41 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJunio C Hamano
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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

Signature · 1 line
gitgitgadget