threads / patch / 28865

patchremote: fix remote set-url usage

Subject: [PATCH] remote: fix remote set-url usage

## tl;dr

5 messages between Nov 7, 2011 and Nov 7, 2011. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Felipe Contreras· Nov 7, 2011, 03:36 UTC · lore
Bad copy-paste.
Otherwise the help would be for a different command:
 git remote set-url --help
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to builtin/remote.c +1 −1
diff --git a/builtin/remote.c b/builtin/remote.c
index e1285be..2add79a 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1427,7 +1427,7 @@ static int set_url(int argc, const char **argv)
 			    "delete URLs"),
 		OPT_END()
 	};
-	argc = parse_options(argc, argv, NULL, options, builtin_remote_update_usage,
+	argc = parse_options(argc, argv, NULL, options, builtin_remote_seturl_usage,
 			     PARSE_OPT_KEEP_ARGV0);
 
 	if (add_mode && delete_mode)
-- 
1.7.7
Junio C Hamano· Nov 7, 2011, 05:12 UTC · re: Felipe Contreras · lore

Re: [PATCH] remote: fix remote set-url usage

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 7 quoted lines
> Bad copy-paste.
>
> Otherwise the help would be for a different command:
>  git remote set-url --help
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
Doesn't the same thing apply to set-branches?
 builtin/remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to builtin/remote.c +1 −1
diff --git a/builtin/remote.c b/builtin/remote.c
index c4d17b5..06741ec 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1336,7 +1336,7 @@ static int set_branches(int argc, const char **argv)
 			     builtin_remote_setbranches_usage, 0);
 	if (argc == 0) {
 		error("no remote specified");
-		usage_with_options(builtin_remote_seturl_usage, options);
+		usage_with_options(builtin_remote_setbranches_usage, options);
 	}
 	argv[argc] = NULL;
 
Junio C Hamano· Nov 7, 2011, 05:44 UTC · re: Junio C Hamano · lore

Re: [PATCH] remote: fix remote set-url usage

By the way, these two are low-impact fixes to relatively ancient problems, so while it is not urgent enough to include them to the upcoming 1.7.8 (the users lived with the bug long enough and survived), I do not see much problem to include them in it, either.

Jonathan Nieder· Nov 7, 2011, 09:48 UTC · re: Junio C Hamano · lore

Re: [PATCH] remote: fix remote set-url usage

Junio C Hamano wrote:
Show 8 quoted lines
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -1336,7 +1336,7 @@ static int set_branches(int argc, const char **argv)
>  			     builtin_remote_setbranches_usage, 0);
>  	if (argc == 0) {
>  		error("no remote specified");
> -		usage_with_options(builtin_remote_seturl_usage, options);
> +		usage_with_options(builtin_remote_setbranches_usage, options);
Good eyes.  Thanks for catching it.

← back to recent threads