From be6f72245232c9b3ccc19d3d233cf16b09ce0bff Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Sun, 21 Apr 2013 14:20:46 +0530 Subject: git-shortlog.txt: remove (-h|--help) from OPTIONS To be consistent with the documentation of all the other commands, remove (-h|--help) from the OPTIONS section. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/git-shortlog.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index c308e91537..c7f7f519b9 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -26,10 +26,6 @@ reference to the current repository. OPTIONS ------- --h:: ---help:: - Print a short usage message and exit. - -n:: --numbered:: Sort output according to the number of commits per author instead -- cgit v1.2.1 From 3a4dc48623793aad5770f0360eca8eb83f943657 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:26 +0530 Subject: revisions.txt: clarify the .. and ... syntax In .. and ..., if either or is omitted, it defaults to 'HEAD'. Add this detail to the document. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/revisions.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index b0f72206a0..242682af07 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -239,11 +239,13 @@ To summarize: '..':: Include commits that are reachable from but exclude - those that are reachable from . + those that are reachable from . When either or + is omitted, it defaults to 'HEAD'. '\...':: Include commits that are reachable from either or - but exclude those that are reachable from both. + but exclude those that are reachable from both. When + either or is omitted, it defaults to 'HEAD'. '{caret}@', e.g. 'HEAD{caret}@':: A suffix '{caret}' followed by an at sign is the same as listing -- cgit v1.2.1 From a682187e190598514fcbd092acace251e9fd633e Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:27 +0530 Subject: git-log.txt: order OPTIONS properly; move .. The OPTIONS section lists .. as the first item, but this is inconsistent with the ordering in SYNOPSIS. Move it down until it appears just before [[--] ...]. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 69db5783ce..64cc337f97 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -24,13 +24,6 @@ each commit introduces are shown. OPTIONS ------- -..:: - Show only commits between the named two commits. When - either or is omitted, it defaults to - `HEAD`, i.e. the tip of the current branch. - For a more complete list of ways to spell - and , see linkgit:gitrevisions[7]. - --follow:: Continue listing the history of a file beyond renames (works only for a single file). @@ -69,6 +62,13 @@ produced by --stat etc. Note that only message is considered, if also a diff is shown its size is not included. +..:: + Show only commits between the named two commits. When + either or is omitted, it defaults to + `HEAD`, i.e. the tip of the current branch. + For a more complete list of ways to spell + and , see linkgit:gitrevisions[7]. + [\--] ...:: Show only commits that are enough to explain how the files that match the specified paths came to be. See "History -- cgit v1.2.1 From 21a40b90e9189aa3f3fbae1ca7a4bad55028ed03 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:28 +0530 Subject: git-log.txt: generalize .. '..' is misleading, as there are many other forms that 'git log' can accept as an argument. Replace it with , referring to the section "Specifying Ranges" in revisions.txt, and rewrite the section appropriately. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 64cc337f97..9576695581 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -9,7 +9,7 @@ git-log - Show commit logs SYNOPSIS -------- [verse] -'git log' [] [..] [[\--] ...] +'git log' [] [] [[\--] ...] DESCRIPTION ----------- @@ -62,12 +62,14 @@ produced by --stat etc. Note that only message is considered, if also a diff is shown its size is not included. -..:: - Show only commits between the named two commits. When - either or is omitted, it defaults to - `HEAD`, i.e. the tip of the current branch. - For a more complete list of ways to spell - and , see linkgit:gitrevisions[7]. +:: + Show only commits in the specified revision range. When no + is specified, it defaults to `HEAD` (i.e. the + whole history leading to the current commit). `origin..HEAD` + specifies all the commits reachable from the current commit + (i.e. `HEAD`), but not from `origin`. For a complete list of + ways to spell , see the "Specifying Ranges" + section of linkgit:gitrevisions[7]. [\--] ...:: Show only commits that are enough to explain how the files -- cgit v1.2.1 From 00200e9ea090cbf68c33e8d00c2976ee49972fdd Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:29 +0530 Subject: git-log.txt: rewrite note on why "--" may be required In its current form, the note talks about separating options from "branch names" and "refnames" in the same sentence. This is entirely inaccurate, as need not be a set of branch names or ref names. Rewrite it to use the word "revision range", to be consistent with the SYNOPSIS. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 9576695581..a976534ab8 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -77,8 +77,8 @@ produced by --stat etc. Simplification" below for details and other simplification modes. + -To prevent confusion with options and branch names, paths may need to -be prefixed with "\-- " to separate them from options or refnames. +Paths may need to be prefixed with "\-- " to separate them from +options or the revision range, when confusion arises. include::rev-list-options.txt[] -- cgit v1.2.1 From 46b2a46dd90f60b99faba8ee7c49c88cb58e0d8a Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:30 +0530 Subject: git-shortlog.txt: make SYNOPSIS match log, update OPTIONS There are broadly two problems with the current SYNOPSIS. First, it completely omits the detail that paths can be specified. Second, it attempts to list all the options: this is futile as, in addition to the options unique to it, it accepts all the options that git-rev-list accepts. In fixing these problems, make the SYNOPSIS consistent with that in git-log.txt. Also add the corresponding sections to OPTIONS. Save adding the options from rev-list-options.txt for a later patch, as it requires some work to pick out the options that are relevant to shortlog. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- Documentation/git-shortlog.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index c7f7f519b9..31af7f2736 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -8,8 +8,8 @@ git-shortlog - Summarize 'git log' output SYNOPSIS -------- [verse] -git log --pretty=short | 'git shortlog' [-h] [-n] [-s] [-e] [-w] -'git shortlog' [-n|--numbered] [-s|--summary] [-e|--email] [-w[[,[,]]]] ... +git log --pretty=short | 'git shortlog' [] +'git shortlog' [] [] [[\--] ...] DESCRIPTION ----------- @@ -56,6 +56,21 @@ OPTIONS If width is `0` (zero) then indent the lines of the output without wrapping them. +:: + Show only commits in the specified revision range. When no + is specified, it defaults to `HEAD` (i.e. the + whole history leading to the current commit). `origin..HEAD` + specifies all the commits reachable from the current commit + (i.e. `HEAD`), but not from `origin`. For a complete list of + ways to spell , see the "Specifying Ranges" + section of linkgit:gitrevisions[7]. + +[\--] ...:: + Consider only commits that are enough to explain how the files + that match the specified paths came to be. ++ +Paths may need to be prefixed with "\-- " to separate them from +options or the revision range, when confusion arises. MAPPING AUTHORS --------------- -- cgit v1.2.1 From e495afcd74ae703db9b396cd46ffc0da368e3905 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 12:50:44 +0530 Subject: builtin/log.c: make usage string consistent with doc Replace '..' with '', in accordance with the documentation. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- builtin/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/log.c b/builtin/log.c index 8f0b2e84fe..4398abf3ae 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -36,7 +36,7 @@ static const char *fmt_patch_subject_prefix = "PATCH"; static const char *fmt_pretty; static const char * const builtin_log_usage[] = { - N_("git log [] [..] [[--] ...]\n") + N_("git log [] [] [[--] ...]\n") N_(" or: git show [options] ..."), NULL }; -- cgit v1.2.1 From 0942d519ada52c9cf831ecd3c562539be939d19e Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 22 Apr 2013 11:00:31 +0530 Subject: builtin/shortlog.c: make usage string consistent with log "--" is used to separate pathspecs from the rev specs, and not rev specs from the options, as the shortlog_usage string currently indicates. In correcting this usage string, make it consistent with the log_usage string. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- builtin/shortlog.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 240bff3efa..1fd6f8ac59 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -10,9 +10,7 @@ #include "parse-options.h" static char const * const shortlog_usage[] = { - N_("git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [... ]"), - "", - N_("[rev-opts] are documented in git-rev-list(1)"), + N_("git shortlog [] [] [[--] [...]]"), NULL }; -- cgit v1.2.1