Subject: Re: [PATCH v3 4/7] fetch: add --refetch option

From: Junio C Hamano <[email-masked]>
Date: Fri, 04 Mar 2022 13:19:07 -0800

"Robert Coup via GitGitGadget" <[email-masked]> writes:

> +static int verbosity, deepen_relative, set_upstream, refetch;
>  static int progress = -1;
>  static int enable_auto_gc = 1;
>  static int tags = TAGS_DEFAULT, unshallow, update_shallow, deepen;
> @@ -190,6 +190,9 @@ static struct option builtin_fetch_options[] = {
>  	OPT_SET_INT_F(0, "unshallow", &unshallow,
>  		      N_("convert to a complete repository"),
>  		      1, PARSE_OPT_NONEG),
> +	OPT_SET_INT_F(0, "refetch", &refetch,
> +		      N_("re-fetch without negotiating common commits"),
> +		      1, PARSE_OPT_NONEG),

I guess the existing --unshallow has the same problem, but it strikes
me odd that these aren't doing a bog-standard OPT_BOOL(), with default
value of "false", like, say "--update-head-ok" does.

That will naturally support things like

	git fetch --refetch --no-refetch

where a later option overrides what an earlier option did.