git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
* [PATCH] fast-import: remove duplicated option-parsing line
@ 2020-10-15 19:34 Jeff King
  2020-10-16 15:49 ` Junio C Hamano
  2020-10-17 23:08 ` brian m. carlson
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff King @ 2020-10-15 19:34 UTC (permalink / raw)
  To: git; +Cc: brian m. carlson, Junio C Hamano

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.

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")) {
-- 
2.29.0.rc1.562.g7bd9bc8902

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fast-import: remove duplicated option-parsing line
  2020-10-15 19:34 [PATCH] fast-import: remove duplicated option-parsing line Jeff King
@ 2020-10-16 15:49 ` Junio C Hamano
  2020-10-17 23:08 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2020-10-16 15:49 UTC (permalink / raw)
  To: Jeff King; +Cc: git, brian m. carlson

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.

>
> 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")) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fast-import: remove duplicated option-parsing line
  2020-10-15 19:34 [PATCH] fast-import: remove duplicated option-parsing line Jeff King
  2020-10-16 15:49 ` Junio C Hamano
@ 2020-10-17 23:08 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2020-10-17 23:08 UTC (permalink / raw)
  To: Jeff King; +Cc: git, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On 2020-10-15 at 19:34:11, Jeff King wrote:
> 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.
> 
> Signed-off-by: Jeff King <peff@peff.net>

This seems clearly correct.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-17 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 19:34 [PATCH] fast-import: remove duplicated option-parsing line Jeff King
2020-10-16 15:49 ` Junio C Hamano
2020-10-17 23:08 ` brian m. carlson

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git