{"thread":{"id":"30180","subject":"[PATCH] remote: update builtin usage","startedAt":"2012-04-07T14:25:52Z","lastAt":"2012-04-09T22:06:32Z","messageCount":2,"participants":["Michael Schubert","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"188734","messageId":"4F804E70.2020106@elegosoft.com","threadId":"30180","inReplyTo":null,"subject":"[PATCH] remote: update builtin usage","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2012-04-07T14:25:52Z","receivedAt":"2012-04-07T14:25:52Z","isPatch":true,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"Add missing options \"--tags|--no-tags\" and \"--push\".\n\nSigned-off-by: Michael Schubert <mschub@elegosoft.com>\n---\n builtin/remote.c |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex fec92bc..b5645fe 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -9,7 +9,7 @@\n \n static const char * const builtin_remote_usage[] = {\n \t\"git remote [-v | --verbose]\",\n-\t\"git remote add [-t <branch>] [-m <master>] [-f] [--mirror=<fetch|push>] <name> <url>\",\n+\t\"git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>\",\n \t\"git remote rename <old> <new>\",\n \t\"git remote rm <name>\",\n \t\"git remote set-head <name> (-a | -d | <branch>)\",\n@@ -17,7 +17,7 @@ static const char * const builtin_remote_usage[] = {\n \t\"git remote prune [-n | --dry-run] <name>\",\n \t\"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]\",\n \t\"git remote set-branches [--add] <name> <branch>...\",\n-\t\"git remote set-url <name> <newurl> [<oldurl>]\",\n+\t\"git remote set-url [--push] <name> <newurl> [<oldurl>]\",\n \t\"git remote set-url --add <name> <newurl>\",\n \t\"git remote set-url --delete <name> <url>\",\n \tNULL\n-- \n1.7.10.dirty\n"},{"id":"188822","messageId":"7vty0stv9z.fsf@alter.siamese.dyndns.org","threadId":"30180","inReplyTo":"4F804E70.2020106@elegosoft.com","subject":"Re: [PATCH] remote: update builtin usage","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-09T22:06:32Z","receivedAt":"2012-04-09T22:06:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Schubert <mschub@elegosoft.com> writes:\n\n> Add missing options \"--tags|--no-tags\" and \"--push\".\n>\n> Signed-off-by: Michael Schubert <mschub@elegosoft.com>\n> ---\n>  builtin/remote.c |    4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin/remote.c b/builtin/remote.c\n> index fec92bc..b5645fe 100644\n> --- a/builtin/remote.c\n> +++ b/builtin/remote.c\n> @@ -9,7 +9,7 @@\n>  \n>  static const char * const builtin_remote_usage[] = {\n>  \t\"git remote [-v | --verbose]\",\n> -\t\"git remote add [-t <branch>] [-m <master>] [-f] [--mirror=<fetch|push>] <name> <url>\",\n> +\t\"git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>\",\n>  \t\"git remote rename <old> <new>\",\n>  \t\"git remote rm <name>\",\n>  \t\"git remote set-head <name> (-a | -d | <branch>)\",\n> @@ -17,7 +17,7 @@ static const char * const builtin_remote_usage[] = {\n>  \t\"git remote prune [-n | --dry-run] <name>\",\n>  \t\"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]\",\n>  \t\"git remote set-branches [--add] <name> <branch>...\",\n> -\t\"git remote set-url <name> <newurl> [<oldurl>]\",\n> +\t\"git remote set-url [--push] <name> <newurl> [<oldurl>]\",\n>  \t\"git remote set-url --add <name> <newurl>\",\n>  \t\"git remote set-url --delete <name> <url>\",\n>  \tNULL\n\n\nHrm.  While this may not be _wrong_ per-se, it strikes me odd that\nbuiltin_remote_usage[] is more or less a superset of the subcommand\nspecific usage text, e.g. builtin_remote_seturl_usage[], etc., but still\nneed to be manually defined like this.  That always leaves a risk that the\ndescriptions would drift apart between the two places.\n\nFor example, builtin_remote_setbranches_usage[] has these two:\n\nstatic const char * const builtin_remote_setbranches_usage[] = {\n        \"git remote set-branches <name> <branch>...\",\n        \"git remote set-branches --add <name> <branch>...\",\n\tNULL\n};\n\nwhere the above has only one, with an optional \"[--add]\".\n\nThere must be a better way to do this.\n"}]}