From: Kjetil Barvik <barvik@broadpark.no>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 5/5] [squash] fsck: revert --quick to the default and introduce --medium
Date: Fri, 30 Jan 2009 12:37:55 +0100 [thread overview]
Message-ID: <861vulqb1o.fsf@broadpark.no> (raw)
In-Reply-To: <1233313517-24208-6-git-send-email-gitster@pobox.com>
Junio C Hamano <gitster@pobox.com> writes:
<snipp>
> diff --git a/builtin-fsck.c b/builtin-fsck.c
> index 72bf33b..83faa98 100644
> --- a/builtin-fsck.c
> +++ b/builtin-fsck.c
> @@ -20,7 +20,7 @@ static int show_tags;
> static int show_unreachable;
> static int include_reflogs = 1;
> static int check_full;
> -static int check_quick;
> +static int check_medium;
> static int check_strict;
> static int keep_cache_objects;
> static unsigned char head_sha1[20];
> @@ -578,7 +578,7 @@ static struct option fsck_opts[] = {
> 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, "fully check packs"),
> - OPT_BOOLEAN(0, "quick", &check_quick, "only check loose objects"),
> + OPT_BOOLEAN(0, "medium", &check_medium, "also check packs"),
> 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"),
> @@ -594,8 +594,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
> errors_found = 0;
>
> argc = parse_options(argc, argv, fsck_opts, fsck_usage, 0);
> - if (check_full && check_quick)
> - die("--full and --quick? which one do you want?");
> + if (check_full && check_medium)
> + die("--full and --medium? which one do you want?");
>
Would it not be better to have an "OPT_INT" argument named
"check_level" or similar?
Then you do not need those error checks, and people would maybe
better understand the differences between the different check's?
The documentation could then say that (for example) "level 2
includes all check's that level 1 includes, in addition to ...".
-- kjetil
next prev parent reply other threads:[~2009-01-30 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 11:05 [PATCH 0/5] fsck updates Junio C Hamano
2009-01-30 11:05 ` [PATCH 1/5] pack-check.c: minor formatting fix to match coding style Junio C Hamano
2009-01-30 11:05 ` [PATCH 2/5] verify_pack(): allow a quicker verification for a pack with version 2 idx Junio C Hamano
2009-01-30 11:05 ` [PATCH 3/5] verify-pack: add --quick Junio C Hamano
2009-01-30 11:05 ` [PATCH 4/5] fsck: three levels of validation Junio C Hamano
2009-01-30 11:05 ` [PATCH 5/5] [squash] fsck: revert --quick to the default and introduce --medium Junio C Hamano
2009-01-30 11:37 ` Kjetil Barvik [this message]
2009-01-31 21:45 ` [PATCH 1/5] pack-check.c: minor formatting fix to match coding style Nanako Shiraishi
2009-01-31 22:00 ` Marius Storm-Olsen
2009-02-01 0:52 ` Nanako Shiraishi
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861vulqb1o.fsf@broadpark.no \
--to=barvik@broadpark.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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.