All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: brush up obsolete bits of git-fsck manpage
@ 2011-12-16 11:33 Jeff King
  2011-12-16 20:40 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2011-12-16 11:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

After the description and options, the fsck manpage contains
some discussion about what it does. Over time, this
discussion has become somewhat obsolete, both in content and
formatting. In particular:

  1. There are many options now, so starting the discussion
     with "It tests..." makes it unclear whether we are
     talking about the last option, or about the tool in
     general. Let's start a new "discussion" section and
     make our antecedent more clear.

  2. It gave an example for --unreachable using for-each-ref
     to mention all of the heads, saying that it will do "a
     _lot_ of verification". This is hopelessly out-of-date,
     as giving no arguments will check much more (reflogs,
     the index, non-head refs).

  3. It goes on to mention tests "to be added" (like tree
     object sorting). We now have these tests.

Signed-off-by: Jeff King <peff@peff.net>
---
I posted this here:

  http://thread.gmane.org/gmane.comp.version-control.git/181673/focus=181701

and I think it simply got lost in the discussion.

We ended up discussing the possibility of deprecating refs on the
command-line to fsck. I still think that's reasonable, but in the
meantime, this patch is a reasonable improvement.

 Documentation/git-fsck.txt |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt
index 0a17b42..6c47395 100644
--- a/Documentation/git-fsck.txt
+++ b/Documentation/git-fsck.txt
@@ -81,30 +81,20 @@ index file, all SHA1 references in .git/refs/*, and all reflogs (unless
 	progress status even if the standard error stream is not
 	directed to a terminal.
 
-It tests SHA1 and general object sanity, and it does full tracking of
-the resulting reachability and everything else. It prints out any
-corruption it finds (missing or bad objects), and if you use the
-'--unreachable' flag it will also print out objects that exist but
-that aren't reachable from any of the specified head nodes.
-
-So for example
-
-	git fsck --unreachable HEAD \
-		$(git for-each-ref --format="%(objectname)" refs/heads)
+DISCUSSION
+----------
 
-will do quite a _lot_ of verification on the tree. There are a few
-extra validity tests to be added (make sure that tree objects are
-sorted properly etc), but on the whole if 'git fsck' is happy, you
-do have a valid tree.
+git-fsck tests SHA1 and general object sanity, and it does full tracking
+of the resulting reachability and everything else. It prints out any
+corruption it finds (missing or bad objects), and if you use the
+'--unreachable' flag it will also print out objects that exist but that
+aren't reachable from any of the specified head nodes (or the default
+set, as mentioned above).
 
 Any corrupt objects you will have to find in backups or other archives
 (i.e., you can just remove them and do an 'rsync' with some other site in
 the hopes that somebody else has the object you have corrupted).
 
-Of course, "valid tree" doesn't mean that it wasn't generated by some
-evil person, and the end result might be crap. git is a revision
-tracking system, not a quality assurance system ;)
-
 Extracted Diagnostics
 ---------------------
 
-- 
1.7.7.4.13.g57bf4

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

* Re: [PATCH] docs: brush up obsolete bits of git-fsck manpage
  2011-12-16 11:33 [PATCH] docs: brush up obsolete bits of git-fsck manpage Jeff King
@ 2011-12-16 20:40 ` Junio C Hamano
  2011-12-17  1:28   ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2011-12-16 20:40 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Makes sense; thanks.

By the way did you hand-tweak your patch in any way?

I am not complaining that it does not apply (it does), but I am curious
how you got the line that begins with "corruption it finds ..." neatly in
preimage and postimage; it could become a common line but doing so makes
the patch unreadable and that is what I am getting from "git show" after
applying the patch.

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

* Re: [PATCH] docs: brush up obsolete bits of git-fsck manpage
  2011-12-16 20:40 ` Junio C Hamano
@ 2011-12-17  1:28   ` Jeff King
  2011-12-17  6:10     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2011-12-17  1:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Dec 16, 2011 at 12:40:11PM -0800, Junio C Hamano wrote:

> By the way did you hand-tweak your patch in any way?
> 
> I am not complaining that it does not apply (it does), but I am curious
> how you got the line that begins with "corruption it finds ..." neatly in
> preimage and postimage; it could become a common line but doing so makes
> the patch unreadable and that is what I am getting from "git show" after
> applying the patch.

No, I don't think I tweaked it at all. You can fetch the original commit
(888b4eb) at:

  git://github.com/peff/git.git jk/fsck-docs

Running "git show" produces the same output as the patch I sent. I
double-checked with older versions of git, and they all produce the same
output for me. Ditto for applying what I sent and running "git show" on
the result.

Using "--patience", on the other hand, does find it as a common line,
Weird.

-Peff

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

* Re: [PATCH] docs: brush up obsolete bits of git-fsck manpage
  2011-12-17  1:28   ` Jeff King
@ 2011-12-17  6:10     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2011-12-17  6:10 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King <peff@peff.net> writes:

> Using "--patience", on the other hand, does find it as a common line,

Ahh, that must be it.  Thanks, and sorry for the noise.

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

end of thread, other threads:[~2011-12-17  6:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 11:33 [PATCH] docs: brush up obsolete bits of git-fsck manpage Jeff King
2011-12-16 20:40 ` Junio C Hamano
2011-12-17  1:28   ` Jeff King
2011-12-17  6:10     ` 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.