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

Re: [PATCH] fast-import: remove duplicated option-parsing line

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2020, 15:49 UTC
Message-ID
<xmqqblh2dvbx.fsf@gitster.c.googlers.com>
In-Reply-To
<20201015193411.GA1130491@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Commit 1bdca81641 (fast-import: add options for rewriting submodules,
> 2020-02-22) accidentally added two lines parsing the option
> "rewrite-submodules-from". This didn't do anything in practice, because
> they're in an if/else chain and so the second one can never trigger.

Thanks; it is embarrassing of me that I didn't see it while applying.

Show 20 quoted lines
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> Another tidbit I noticed in my foray into fast-import earlier today.
>
>  builtin/fast-import.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/builtin/fast-import.c b/builtin/fast-import.c
> index 70d7d25eed..dd4d09cece 100644
> --- a/builtin/fast-import.c
> +++ b/builtin/fast-import.c
> @@ -3399,7 +3399,6 @@ static int parse_one_feature(const char *feature, int from_stream)
>  		option_rewrite_submodules(arg, &sub_marks_to);
>  	} else if (skip_prefix(feature, "rewrite-submodules-from=", &arg)) {
>  		option_rewrite_submodules(arg, &sub_marks_from);
> -	} else if (skip_prefix(feature, "rewrite-submodules-from=", &arg)) {
>  	} else if (!strcmp(feature, "get-mark")) {
>  		; /* Don't die - this feature is supported */
>  	} else if (!strcmp(feature, "cat-blob")) {
Previous: Jeff KingNext: brian m. carlson
Message 2 of 3 in “fast-import: remove duplicated option-parsing line”
  1. fast-import: remove duplicated option-parsing lineJeff King, Oct 15, 2020
  2. Junio C HamanoOct 16, 2020
  3. brian m. carlsonOct 17, 2020

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.