summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d9ccfe7)
raw | patch | inline | side by side (parent: d9ccfe7)
author | Shawn Bohrer <shawn.bohrer@gmail.com> | |
Mon, 3 Dec 2007 05:02:09 +0000 (23:02 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 3 Dec 2007 07:35:46 +0000 (23:35 -0800) |
git status shares the same usage information as git commit since it
shows what would be committed if the same options are given. However,
when displaying the usage information for git status it should say it
is for git status not git commit.
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
shows what would be committed if the same options are given. However,
when displaying the usage information for git status it should say it
is for git status not git commit.
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index 05594f2b1353714e95a0de4cc680e231b58c5e5b..f37a90f078b3e952830abe7ddb83599df2352eff 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
NULL
};
+static const char * const builtin_status_usage[] = {
+ "git-status [options] [--] <filepattern>...",
+ NULL
+};
+
static unsigned char head_sha1[20], merge_head_sha1[20];
static char *use_message_buffer;
static const char commit_editmsg[] = "COMMIT_EDITMSG";
strbuf_addf(sb, "author %s\n", fmt_ident(name, email, date, 1));
}
-static int parse_and_validate_options(int argc, const char *argv[])
+static int parse_and_validate_options(int argc, const char *argv[],
+ const char * const usage[])
{
int f = 0;
- argc = parse_options(argc, argv, builtin_commit_options,
- builtin_commit_usage, 0);
+ argc = parse_options(argc, argv, builtin_commit_options, usage, 0);
if (logfile || message.len || use_message)
no_edit = 1;
git_config(git_status_config);
- argc = parse_and_validate_options(argc, argv);
+ argc = parse_and_validate_options(argc, argv, builtin_status_usage);
index_file = prepare_index(argv, prefix);
git_config(git_commit_config);
- argc = parse_and_validate_options(argc, argv);
+ argc = parse_and_validate_options(argc, argv, builtin_commit_usage);
index_file = prepare_index(argv, prefix);