git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] [squash] fsck: revert --quick to the default and introduce --medium

From
KBKjetil Barvik <barvik@broadpark.no>
Date
Jan 30, 2009, 11:37 UTC
Message-ID
<861vulqb1o.fsf@broadpark.no>
In-Reply-To
<1233313517-24208-6-git-send-email-gitster@pobox.com>

Junio C Hamano <gitster@pobox.com> writes: <snipp>

Show 31 quoted lines
> 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
Previous: Junio C HamanoNext: Nanako Shiraishi
Message 7 of 10 in “fsck updates”
  1. 0/5 fsck updatesJunio C Hamano, Jan 30, 2009
  2. 1/5 pack-check.c: minor formatting fix to match coding styleJunio C Hamano, Jan 30, 2009
  3. 2/5 verify_pack(): allow a quicker verification for a pack with version 2 idxJunio C Hamano, Jan 30, 2009
  4. 3/5 verify-pack: add --quickJunio C Hamano, Jan 30, 2009
  5. 4/5 fsck: three levels of validationJunio C Hamano, Jan 30, 2009
  6. 5/5 [squash] fsck: revert --quick to the default and introduce --mediumJunio C Hamano, Jan 30, 2009
  7. Kjetil BarvikJan 30, 2009
  8. Nanako ShiraishiJan 31, 2009
  9. Marius Storm-OlsenJan 31, 2009
  10. Nanako ShiraishiFeb 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.