{"thread":{"id":"11110","subject":"[PATCH] Make git status usage say git status instead of git commit","startedAt":"2007-12-03T05:02:09Z","lastAt":"2007-12-03T12:04:08Z","messageCount":6,"participants":["Shawn Bohrer","Junio C Hamano","David Kastrup","Miklos Vajna","Florian Weimer","Eyvind Bernhardsen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"61723","messageId":"1196658129-16708-1-git-send-email-shawn.bohrer@gmail.com","threadId":"11110","inReplyTo":null,"subject":"[PATCH] Make git status usage say git status instead of git commit","fromName":"Shawn Bohrer","fromEmail":"shawn.bohrer@gmail.com","sentAt":"2007-12-03T05:02:09Z","receivedAt":"2007-12-03T05:02:09Z","isPatch":true,"sender":{"key":"shawn.bohrer@gmail.com","avatar":"https://gravatar.com/avatar/6eb093ef7d276306d18366254e0c95ff6a5db58231ac7e82fe78c2800aaae1b6?d=mp&s=160"},"body":"git status shares the same usage information as git commit since it\nshows what would be committed if the same options are given.  However,\nwhen displaying the usage information for git status it should say it\nis for git status not git commit.\n\nSigned-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>\n---\n\nAs a side question, should the usage information also use the non dash\nnotation of the command since it is deprecated?  I noticed all of the\nother commands are presently using the dash form, so I left it as is for\nnow.\n\n builtin-commit.c |   15 ++++++++++-----\n 1 files changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex f6e8e44..5e85a22 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -27,6 +27,11 @@ static const char * const builtin_commit_usage[] = {\n \tNULL\n };\n \n+static const char * const builtin_status_usage[] = {\n+\t\"git-status [options] [--] <filepattern>...\",\n+\tNULL\n+};\n+\n static unsigned char head_sha1[20], merge_head_sha1[20];\n static char *use_message_buffer;\n static const char commit_editmsg[] = \"COMMIT_EDITMSG\";\n@@ -495,12 +500,12 @@ static void determine_author_info(struct strbuf *sb)\n \tstrbuf_addf(sb, \"author %s\\n\", fmt_ident(name, email, date, 1));\n }\n \n-static int parse_and_validate_options(int argc, const char *argv[])\n+static int parse_and_validate_options(int argc, const char *argv[],\n+\t\t\t\t      const char * const usage[])\n {\n \tint f = 0;\n \n-\targc = parse_options(argc, argv, builtin_commit_options,\n-\t\t\t     builtin_commit_usage, 0);\n+\targc = parse_options(argc, argv, builtin_commit_options, usage, 0);\n \n \tif (logfile || message.len || use_message)\n \t\tno_edit = 1;\n@@ -597,7 +602,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_status_config);\n \n-\targc = parse_and_validate_options(argc, argv);\n+\targc = parse_and_validate_options(argc, argv, builtin_status_usage);\n \n \tindex_file = prepare_index(argc, argv, prefix);\n \n@@ -689,7 +694,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_commit_config);\n \n-\targc = parse_and_validate_options(argc, argv);\n+\targc = parse_and_validate_options(argc, argv, builtin_commit_usage);\n \n \tindex_file = prepare_index(argc, argv, prefix);\n \n-- \n1.5.3.6\n"},{"id":"61729","messageId":"7vir3gqr3d.fsf@gitster.siamese.dyndns.org","threadId":"11110","inReplyTo":"1196658129-16708-1-git-send-email-shawn.bohrer@gmail.com","subject":"Re: [PATCH] Make git status usage say git status instead of git commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-03T05:34:14Z","receivedAt":"2007-12-03T05:34:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shawn Bohrer <shawn.bohrer@gmail.com> writes:\n\n> git status shares the same usage information as git commit since it\n> shows what would be committed if the same options are given.  However,\n> when displaying the usage information for git status it should say it\n> is for git status not git commit.\n>\n> Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>\n\nThanks.  Will apply.\n\n> As a side question, should the usage information also use the non dash\n> notation of the command since it is deprecated?  I noticed all of the\n> other commands are presently using the dash form, so I left it as is for\n> now.\n\nWise choice.  We would probably want to clean them up at the same time\nearly post 1.5.4.\n"},{"id":"61760","messageId":"854pf0hyy3.fsf@lola.goethe.zz","threadId":"11110","inReplyTo":"7vir3gqr3d.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Make git status usage say git status instead of git commit","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-12-03T10:09:24Z","receivedAt":"2007-12-03T10:09:24Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Shawn Bohrer <shawn.bohrer@gmail.com> writes:\n>\n>> As a side question, should the usage information also use the non\n>> dash notation of the command since it is deprecated?  I noticed all\n>> of the other commands are presently using the dash form, so I left it\n>> as is for now.\n>\n> Wise choice.  We would probably want to clean them up at the same time\n> early post 1.5.4.\n\nDeprecating the dash form will probably mean that we need to think up\n(and document) a rationale for\n\n  man git-commit\n\nI actually have typed something like\n\n  man git commit\n\na number of times already with obvious results.  Finger memory.\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"},{"id":"61765","messageId":"877ijww0d3.fsf@mid.deneb.enyo.de","threadId":"11110","inReplyTo":"854pf0hyy3.fsf@lola.goethe.zz","subject":"Re: [PATCH] Make git status usage say git status instead of git commit","fromName":"Florian Weimer","fromEmail":"fw@deneb.enyo.de","sentAt":"2007-12-03T10:15:04Z","receivedAt":"2007-12-03T10:15:04Z","isPatch":true,"sender":{"key":"fw@deneb.enyo.de","avatar":null},"body":"* David Kastrup:\n\n> Deprecating the dash form will probably mean that we need to think up\n> (and document) a rationale for\n>\n>   man git-commit\n>\n> I actually have typed something like\n>\n>   man git commit\n>\n> a number of times already with obvious results.  Finger memory.\n\nIt's also a bit strange to have a git-commit(1) manpage when there is no\ngit-commit on the path.\n"},{"id":"61762","messageId":"20071203102124.GY31750@genesis.frugalware.org","threadId":"11110","inReplyTo":"854pf0hyy3.fsf@lola.goethe.zz","subject":"Re: [PATCH] Make git status usage say git status instead of git commit","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2007-12-03T10:21:24Z","receivedAt":"2007-12-03T10:21:24Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Mon, Dec 03, 2007 at 11:09:24AM +0100, David Kastrup <dak@gnu.org> wrote:\n> Deprecating the dash form will probably mean that we need to think up\n> (and document) a rationale for\n> \n>   man git-commit\n> \n> I actually have typed something like\n> \n>   man git commit\n> \n> a number of times already with obvious results.  Finger memory.\n\nthat's why we have git help commit :)\n\n- VMiklos\n"},{"id":"61776","messageId":"116ABC64-B936-4EA3-9E8A-12FD71DDC1EA@orakel.ntnu.no","threadId":"11110","inReplyTo":"877ijww0d3.fsf@mid.deneb.enyo.de","subject":"Re: [PATCH] Make git status usage say git status instead of git commit","fromName":"Eyvind Bernhardsen","fromEmail":"eyvind-git-list@orakel.ntnu.no","sentAt":"2007-12-03T12:04:08Z","receivedAt":"2007-12-03T12:04:08Z","isPatch":true,"sender":{"key":"eyvind-git-list@orakel.ntnu.no","avatar":null},"body":"On 3. des. 2007, at 11.15, Florian Weimer wrote:\n\n> * David Kastrup:\n>\n>> Deprecating the dash form will probably mean that we need to think up\n>> (and document) a rationale for\n>>\n>>   man git-commit\n>>\n>> I actually have typed something like\n>>\n>>   man git commit\n>>\n>> a number of times already with obvious results.  Finger memory.\n>\n> It's also a bit strange to have a git-commit(1) manpage when there  \n> is no\n> git-commit on the path.\n\nNo stranger than having a perlfunc(1) manpage.  bash-builtins is in  \nsection 7, maybe git-* should be moved there?  Of course, then git  \nwouldn't have any manpages in section 1 at all.\n\nEyvind\n"}]}