From: "Wesley J. Landaker" <wjl@icecavern.net>
To: git@vger.kernel.org
Cc: Sergio Callegari <sergio.callegari@gmail.com>,
Johannes Sixt <j.sixt@viscovery.net>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: git fsck not identifying corrupted packs
Date: Mon, 19 Oct 2009 13:07:56 -0600 [thread overview]
Message-ID: <200910191307.56989.wjl@icecavern.net> (raw)
In-Reply-To: <4ADC45C7.6090907@gmail.com>
On Monday 19 October 2009 04:56:07 Sergio Callegari wrote:
> Johannes Sixt wrote:
> > Sergio Callegari schrieb:
> >> Is there a means to have fsck to a truly full check on the sanity of a
> >> repo?
> >
> > git fsck --full
> >
> > RTFM, please.
>
> Right... sorry for the noise, I mismatched --strict for --full in a
> script.
>
> BTW, the short help for fsck at --full only says "consider objects in
> alternate repositories".
Until I read this thread, I didn't realize you needed --full to check
objects in packs.
Since just every git repository I ever use has 99%+ of it's objects in
packs, this means every time I've run "git fsck" it's essentially been
a no-op and I didn't know it. I imagine this is a common confusion.
Also, having --full mean both "check alternate object pools", and "check
objects in packs" seems to be rolling up two orthogonal issues.
But anyway, here is a patch that at least fixes the short option help to
match the manual and the current behavior:
--- 8< ---
From 8fc3cd68d496bf00faad4f0a7b6ae4fee9437e68 Mon Sep 17 00:00:00 2001
From: Wesley J. Landaker <wjl@icecavern.net>
Date: Mon, 19 Oct 2009 12:48:07 -0600
Subject: [PATCH] Update git fsck --full short description to mention packs
The '--full' option to git fsck does two things:
1) Check objects in packs
2) Check alternate objects
This is documented in the git fsck manual; this patch reflects that in
the short git fsck option help message as well.
Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
---
builtin-fsck.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-fsck.c b/builtin-fsck.c
index c58b0e3..63212ea 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -576,7 +576,7 @@ static struct option fsck_opts[] = {
OPT_BOOLEAN(0, "root", &show_root, "report root nodes"),
OPT_BOOLEAN(0, "cache", &keep_cache_objects, "make index objects head nodes"),
OPT_BOOLEAN(0, "reflogs", &include_reflogs, "make reflogs head nodes (default)"),
- OPT_BOOLEAN(0, "full", &check_full, "also consider alternate objects"),
+ OPT_BOOLEAN(0, "full", &check_full, "also consider packs and alternate objects"),
OPT_BOOLEAN(0, "strict", &check_strict, "enable more strict checking"),
OPT_BOOLEAN(0, "lost-found", &write_lost_and_found,
"write dangling objects in .git/lost-found"),
--
1.6.5
next prev parent reply other threads:[~2009-10-19 19:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 7:56 git fsck not identifying corrupted packs Sergio Callegari
2009-10-19 9:11 ` Johannes Sixt
2009-10-19 10:04 ` Johannes Schindelin
2009-10-19 19:03 ` Junio C Hamano
2009-10-19 19:27 ` Wesley J. Landaker
2009-10-20 15:41 ` Robin Rosenberg
2009-10-20 16:20 ` Wesley J. Landaker
2009-10-20 6:26 ` Matthieu Moy
2009-10-20 6:45 ` Junio C Hamano
2009-10-20 9:25 ` Alex Riesen
2009-10-20 10:22 ` Johannes Schindelin
2009-10-20 11:56 ` Matthieu Moy
2009-10-20 18:46 ` [RFC/PATCH] fsck: default to "git fsck --full" Junio C Hamano
2009-10-20 19:00 ` Nicolas Pitre
2009-10-20 19:11 ` Junio C Hamano
2009-10-20 18:39 ` git fsck not identifying corrupted packs Nicolas Pitre
2009-10-20 20:49 ` Alex Riesen
2009-10-19 10:56 ` Sergio Callegari
2009-10-19 19:07 ` Wesley J. Landaker [this message]
2009-10-20 6:24 ` Matthieu Moy
2009-10-19 18:36 ` Gabor Gombas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910191307.56989.wjl@icecavern.net \
--to=wjl@icecavern.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=sergio.callegari@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).