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

th/remote-usage

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 18, 2009, 11:48 UTC
Message-ID
<20091118114808.GA13346@progeny.tock>
In-Reply-To
<7v7hto46ce.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> [New Topics]
> 
> * th/remote-usage (2009-11-16) 1 commit.
>  - git remote: Separate usage strings for subcommands

Glancing at pu^2, I had two small nitpicks: [<options>...] is five characters longer than strictly necessary, and the argument to git remote set-head is not actually optional.

In other words, would it make sense to squash in something like the following?

-- %< --
Subject: Tweak 'git remote' usage strings

The set-head argument is not optional. <options>... is five characters wider than it needs to be.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 builtin-remote.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin-remote.c b/builtin-remote.c
index ee86810..cfd8a36 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -7,14 +7,14 @@
 #include "run-command.h"
 #include "refs.h"
 
-#define REMOTE_BARE_USAGE "git remote [<options>...]"
-#define REMOTE_ADD_USAGE "git remote add [<options>...] <name> <url>"
+#define REMOTE_BARE_USAGE "git remote [options]"
+#define REMOTE_ADD_USAGE "git remote add [options] <name> <url>"
 #define REMOTE_RENAME_USAGE "git remote rename <old> <new>"
 #define REMOTE_RM_USAGE "git remote rm <name>"
-#define REMOTE_SETHEAD_USAGE "git remote set-head <name> [<options>...]"
-#define REMOTE_SHOW_USAGE "git remote show [<options>...] <name>"
-#define REMOTE_PRUNE_USAGE "git remote prune [<options>...] <name>"
-#define REMOTE_UPDATE_USAGE "git remote update [<options>...]"
+#define REMOTE_SETHEAD_USAGE "git remote set-head <name> (-a|-d|<branch>)"
+#define REMOTE_SHOW_USAGE "git remote show [options] <name>"
+#define REMOTE_PRUNE_USAGE "git remote prune [options] <name>"
+#define REMOTE_UPDATE_USAGE "git remote update [options]"
 
 static const char * const builtin_remote_usage[] = {
 	REMOTE_BARE_USAGE,
-- 
1.6.5.2
Previous: Junio C HamanoNext: Jonathan Nieder
Message 5 of 9 in “What's cooking in git.git (Nov 2009, #04; Tue, 17)”
  1. Junio C HamanoNov 18, 2009
  2. Tay Ray ChuanNov 18, 2009
  3. Johannes SixtNov 18, 2009
  4. Junio C HamanoNov 19, 2009
  5. th/remote-usageJonathan Nieder, Nov 18, 2009
  6. Jonathan NiederNov 18, 2009
  7. Tim HeniganNov 18, 2009
  8. Nguyen Thai Ngoc DuyNov 18, 2009
  9. Johannes SixtNov 18, 2009

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.