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

Re: [PATCH] fsck: Replace deprecated OPT_BOOLEAN by OPT_BOOL

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2013, 17:56 UTC
Message-ID
<7vfvux1c97.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1375116354-14618-1-git-send-email-stefanbeller@googlemail.com>
Stefan Beller <stefanbeller@googlemail.com> writes:
Show 7 quoted lines
> This task emerged from b04ba2bb4.
> All occurrences of the respective variables have been reviewed and none
> of them relied on the counting up mechanism, but all of them were
> using the variable as a true boolean.
>
> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
> ---
Looked correct; thanks.
Show 31 quoted lines
>  builtin/fsck.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/builtin/fsck.c b/builtin/fsck.c
> index 9909b6d..39fa5e8 100644
> --- a/builtin/fsck.c
> +++ b/builtin/fsck.c
> @@ -611,15 +611,15 @@ static char const * const fsck_usage[] = {
>  
>  static struct option fsck_opts[] = {
>  	OPT__VERBOSE(&verbose, N_("be verbose")),
> -	OPT_BOOLEAN(0, "unreachable", &show_unreachable, N_("show unreachable objects")),
> +	OPT_BOOL(0, "unreachable", &show_unreachable, N_("show unreachable objects")),
>  	OPT_BOOL(0, "dangling", &show_dangling, N_("show dangling objects")),
> -	OPT_BOOLEAN(0, "tags", &show_tags, N_("report tags")),
> -	OPT_BOOLEAN(0, "root", &show_root, N_("report root nodes")),
> -	OPT_BOOLEAN(0, "cache", &keep_cache_objects, N_("make index objects head nodes")),
> -	OPT_BOOLEAN(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")),
> -	OPT_BOOLEAN(0, "full", &check_full, N_("also consider packs and alternate objects")),
> -	OPT_BOOLEAN(0, "strict", &check_strict, N_("enable more strict checking")),
> -	OPT_BOOLEAN(0, "lost-found", &write_lost_and_found,
> +	OPT_BOOL(0, "tags", &show_tags, N_("report tags")),
> +	OPT_BOOL(0, "root", &show_root, N_("report root nodes")),
> +	OPT_BOOL(0, "cache", &keep_cache_objects, N_("make index objects head nodes")),
> +	OPT_BOOL(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")),
> +	OPT_BOOL(0, "full", &check_full, N_("also consider packs and alternate objects")),
> +	OPT_BOOL(0, "strict", &check_strict, N_("enable more strict checking")),
> +	OPT_BOOL(0, "lost-found", &write_lost_and_found,
>  				N_("write dangling objects in .git/lost-found")),
>  	OPT_BOOL(0, "progress", &show_progress, N_("show progress")),
>  	OPT_END(),
Previous: Stefan Beller
Message 2 of 2 in “fsck: Replace deprecated OPT_BOOLEAN by OPT_BOOL”
  1. fsck: Replace deprecated OPT_BOOLEAN by OPT_BOOLStefan Beller, Jul 29, 2013
  2. Junio C HamanoJul 29, 2013

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.