Git development
 help / color / mirror / Atom feed
From: Antoine Pelisse <apelisse@gmail.com>
To: git@vger.kernel.org
Cc: Antoine Pelisse <apelisse@gmail.com>
Subject: [PATCH] update-index: allow "-h" to also display options
Date: Sat, 23 Feb 2013 19:10:41 +0100	[thread overview]
Message-ID: <1361643041-19036-1-git-send-email-apelisse@gmail.com> (raw)

Currently, when running "git update-index -h", you only have usage
displayed, but no options. That is not consistent with the behavior of
other commands. It also means that the only way to display options is to
use an unknown argument (or use the man page).

Display usage with options when "git update-index -h" is invoked.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
 builtin/update-index.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/update-index.c b/builtin/update-index.c
index ada1dff..3071ee6 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -796,7 +796,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
 	};
 
 	if (argc == 2 && !strcmp(argv[1], "-h"))
-		usage(update_index_usage[0]);
+		usage_with_options(&update_index_usage[0], options);
 
 	git_config(git_default_config, NULL);
 
-- 
1.7.9.5

             reply	other threads:[~2013-02-23 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-23 18:10 Antoine Pelisse [this message]
2013-02-23 18:13 ` [PATCH] update-index: allow "-h" to also display options Antoine Pelisse
2013-02-23 21:25   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=1361643041-19036-1-git-send-email-apelisse@gmail.com \
    --to=apelisse@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox