]> git.ipfire.org Git - thirdparty/git.git/commit - fsck.c
fsck: optionally show more helpful info for broken links
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 17 Jul 2016 11:00:02 +0000 (13:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Jul 2016 22:15:59 +0000 (15:15 -0700)
commit90cf590f53f2939a47ca7b397e270e8228699829
tree54a32ad0aa0098c039f7a5a12ac9ca8e3a4febde
parent1cd772cc4124e43b14231dcaeae8a5dddf4ffdb9
fsck: optionally show more helpful info for broken links

When reporting broken links between commits/trees/blobs, it would be
quite helpful at times if the user would be told how the object is
supposed to be reachable.

With the new --name-objects option, git-fsck will try to do exactly
that: name the objects in a way that shows how they are reachable.

For example, when some reflog got corrupted and a blob is missing that
should not be, the user might want to remove the corresponding reflog
entry. This option helps them find that entry: `git fsck` will now
report something like this:

broken link from    tree b5eb6ff...  (refs/stash@{<date>}~37:)
              to    blob ec5cf80...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-fsck.txt
builtin/fsck.c
fsck.c
t/t1450-fsck.sh