git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thiago Farina <tfransosi@gmail.com>
To: git@vger.kernel.org
Cc: Thiago Farina <tfransosi@gmail.com>
Subject: [PATCH v2] Update the usage bundle string.
Date: Wed, 16 Sep 2009 22:13:36 -0400	[thread overview]
Message-ID: <1253153616-10051-1-git-send-email-tfransosi@gmail.com> (raw)

Currently the usage bundle string is not well formatted.
Now it is formatted and the user can read the string much more easily.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 builtin-bundle.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/builtin-bundle.c b/builtin-bundle.c
index 9b58152..bade253 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\
+         git bundle verify <file>\n\
+         git bundle list-heads <file> [refname...]\n\
+         git bundle unbundle <file> [refname...]";
 
 int cmd_bundle(int argc, const char **argv, const char *prefix)
 {
@@ -19,8 +23,8 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
 	int bundle_fd = -1;
 	char buffer[PATH_MAX];
 
-	if (argc < 3)
-		usage(bundle_usage);
+  if (argc < 3)
+		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

             reply	other threads:[~2009-09-17  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17  2:13 Thiago Farina [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-16 21:32 [PATCH v2] Update the usage bundle string Thiago Farina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253153616-10051-1-git-send-email-tfransosi@gmail.com \
    --to=tfransosi@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).