threads / patch / 20991

v3Update the usage bundle string.

Subject: [PATCH v3] Update the usage bundle string.

## tl;dr

One message between Sep 17, 2009 and Sep 17, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Thiago Farina· Sep 17, 2009, 17:20 UTC · lore

Currently the usage bundle string is not well formatted. Now it is formatted and the user can read the string much more easily. Also makes the output more consistent with the other usage strings that use usage_with_options to show the usage string.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 builtin-bundle.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
Show changes to builtin-bundle.c +7 −3
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 9b58152..2006cc5 100644
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
@@ -9,7 +9,11 @@
  * bundle supporting "fetch", "pull", and "ls-remote".
  */
 
-static const char *bundle_usage="git bundle (create <bundle> <git rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
+static const char builtin_bundle_usage[] =
+  "git bundle create <file> <git-rev-list args>\n"
+  "   or: git bundle verify <file>\n"
+  "   or: git bundle list-heads <file> [refname...]\n"
+  "   or: git bundle unbundle <file> [refname...]";
 
 int cmd_bundle(int argc, const char **argv, const char *prefix)
 {
@@ -20,7 +24,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
 	char buffer[PATH_MAX];
 
 	if (argc < 3)
-		usage(bundle_usage);
+		usage(builtin_bundle_usage);
 
 	cmd = argv[1];
 	bundle_file = argv[2];
@@ -59,5 +63,5 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
 		return !!unbundle(&header, bundle_fd) ||
 			list_bundle_refs(&header, argc, argv);
 	} else
-		usage(bundle_usage);
+		usage(builtin_bundle_usage);
 }
-- 
1.6.5.rc0.dirty

← back to recent threads