{"thread":{"id":"54432","subject":"[PATCH] fast-import: remove duplicated option-parsing line","startedAt":"2020-10-15T19:34:14Z","lastAt":"2020-10-17T23:09:20Z","messageCount":3,"participants":["Jeff King","Junio C Hamano","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"407666","messageId":"20201015193411.GA1130491@coredump.intra.peff.net","threadId":"54432","inReplyTo":null,"subject":"[PATCH] fast-import: remove duplicated option-parsing line","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-10-15T19:34:11Z","receivedAt":"2020-10-15T19:34:14Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Commit 1bdca81641 (fast-import: add options for rewriting submodules,\n2020-02-22) accidentally added two lines parsing the option\n\"rewrite-submodules-from\". This didn't do anything in practice, because\nthey're in an if/else chain and so the second one can never trigger.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nAnother tidbit I noticed in my foray into fast-import earlier today.\n\n builtin/fast-import.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/builtin/fast-import.c b/builtin/fast-import.c\nindex 70d7d25eed..dd4d09cece 100644\n--- a/builtin/fast-import.c\n+++ b/builtin/fast-import.c\n@@ -3399,7 +3399,6 @@ static int parse_one_feature(const char *feature, int from_stream)\n \t\toption_rewrite_submodules(arg, &sub_marks_to);\n \t} else if (skip_prefix(feature, \"rewrite-submodules-from=\", &arg)) {\n \t\toption_rewrite_submodules(arg, &sub_marks_from);\n-\t} else if (skip_prefix(feature, \"rewrite-submodules-from=\", &arg)) {\n \t} else if (!strcmp(feature, \"get-mark\")) {\n \t\t; /* Don't die - this feature is supported */\n \t} else if (!strcmp(feature, \"cat-blob\")) {\n-- \n2.29.0.rc1.562.g7bd9bc8902\n"},{"id":"407722","messageId":"xmqqblh2dvbx.fsf@gitster.c.googlers.com","threadId":"54432","inReplyTo":"20201015193411.GA1130491@coredump.intra.peff.net","subject":"Re: [PATCH] fast-import: remove duplicated option-parsing line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-16T15:49:54Z","receivedAt":"2020-10-16T15:49:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Commit 1bdca81641 (fast-import: add options for rewriting submodules,\n> 2020-02-22) accidentally added two lines parsing the option\n> \"rewrite-submodules-from\". This didn't do anything in practice, because\n> they're in an if/else chain and so the second one can never trigger.\n\nThanks; it is embarrassing of me that I didn't see it while\napplying.\n\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> Another tidbit I noticed in my foray into fast-import earlier today.\n>\n>  builtin/fast-import.c | 1 -\n>  1 file changed, 1 deletion(-)\n>\n> diff --git a/builtin/fast-import.c b/builtin/fast-import.c\n> index 70d7d25eed..dd4d09cece 100644\n> --- a/builtin/fast-import.c\n> +++ b/builtin/fast-import.c\n> @@ -3399,7 +3399,6 @@ static int parse_one_feature(const char *feature, int from_stream)\n>  \t\toption_rewrite_submodules(arg, &sub_marks_to);\n>  \t} else if (skip_prefix(feature, \"rewrite-submodules-from=\", &arg)) {\n>  \t\toption_rewrite_submodules(arg, &sub_marks_from);\n> -\t} else if (skip_prefix(feature, \"rewrite-submodules-from=\", &arg)) {\n>  \t} else if (!strcmp(feature, \"get-mark\")) {\n>  \t\t; /* Don't die - this feature is supported */\n>  \t} else if (!strcmp(feature, \"cat-blob\")) {\n"},{"id":"407818","messageId":"20201017230840.GH490427@camp.crustytoothpaste.net","threadId":"54432","inReplyTo":"20201015193411.GA1130491@coredump.intra.peff.net","subject":"Re: [PATCH] fast-import: remove duplicated option-parsing line","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-10-17T23:08:40Z","receivedAt":"2020-10-17T23:09:20Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2020-10-15 at 19:34:11, Jeff King wrote:\n> Commit 1bdca81641 (fast-import: add options for rewriting submodules,\n> 2020-02-22) accidentally added two lines parsing the option\n> \"rewrite-submodules-from\". This didn't do anything in practice, because\n> they're in an if/else chain and so the second one can never trigger.\n> \n> Signed-off-by: Jeff King <peff@peff.net>\n\nThis seems clearly correct.\n-- \nbrian m. carlson (he/him or they/them)\nHouston, Texas, US\n"}]}