All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Teach `git fsck` a new option: `--name-objects`
@ 2016-07-14 15:30 Johannes Schindelin
  2016-07-14 15:30 ` [PATCH 1/3] fsck: refactor how to describe objects Johannes Schindelin
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Johannes Schindelin @ 2016-07-14 15:30 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

When using experimental features (such as worktrees), it is quite
possible to end up with a repository that is a little bit corrupted. In
this developer's case, the auto gc run during interactive rebases in
worktrees completely messed up the reflogs.

The symptoms are broken links between commits/trees/blobs.

Trying to work around such problems can be a real challenge: while
several tools will report when objects are missing, all of them simply
state the SHA-1. This is not useful when the user has to kiss the
offending reflog good-bye, but does not even know which one.

This patch series introduces a new option to `git fsck`: --name-objects.
With this option, the fsck command will report not only the SHA-1 of
missing objects, but also a name by which this object is supposed to be
reachable.

Example output:

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

Originally, I intended to teach name-rev a new mode where it would also
name objects other than commits and tags, but since the objects in
question were lost to a garbage collection, and therefore there would
not have been any objects to call names to begin with, I had to abandon
said quest.


Johannes Schindelin (3):
  fsck: refactor how to describe objects
  fsck_walk(): optionally name objects on the go
  fsck: optionally show more helpful info for broken links

 Documentation/git-fsck.txt |  9 +++++-
 builtin/fsck.c             | 77 ++++++++++++++++++++++++++++++++++++----------
 fsck.c                     | 72 +++++++++++++++++++++++++++++++++++++++++++
 fsck.h                     |  1 +
 t/t1450-fsck.sh            | 22 +++++++++++++
 5 files changed, 163 insertions(+), 18 deletions(-)

Published-As: https://github.com/dscho/git/releases/tag/fsck-name-objects-v1
-- 
2.9.0.278.g1caae67

base-commit: 79ed43c28f626a4e805f350a77c54968b59be6e9

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-07-18 18:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 15:30 [PATCH 0/3] Teach `git fsck` a new option: `--name-objects` Johannes Schindelin
2016-07-14 15:30 ` [PATCH 1/3] fsck: refactor how to describe objects Johannes Schindelin
2016-07-14 16:33   ` Junio C Hamano
2016-07-14 15:30 ` [PATCH 2/3] fsck_walk(): optionally name objects on the go Johannes Schindelin
2016-07-14 17:03   ` Junio C Hamano
2016-07-17  8:44     ` Johannes Schindelin
2016-07-14 15:30 ` [PATCH 3/3] fsck: optionally show more helpful info for broken links Johannes Schindelin
2016-07-15  6:20   ` Eric Sunshine
2016-07-17  8:22     ` Johannes Schindelin
2016-07-14 16:32 ` [PATCH 0/3] Teach `git fsck` a new option: `--name-objects` Junio C Hamano
2016-07-17 10:59 ` [PATCH v2 0/4] " Johannes Schindelin
2016-07-17 10:59   ` [PATCH v2 1/4] fsck: refactor how to describe objects Johannes Schindelin
2016-07-17 10:59   ` [PATCH v2 2/4] fsck_walk(): optionally name objects on the go Johannes Schindelin
2016-07-17 10:59   ` [PATCH v2 3/4] fsck: give the error function a chance to see the fsck_options Johannes Schindelin
2016-07-17 11:00   ` [PATCH v2 4/4] fsck: optionally show more helpful info for broken links Johannes Schindelin
2016-07-18 18:42   ` [PATCH v2 0/4] Teach `git fsck` a new option: `--name-objects` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.