diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 69db5783c..a976534ab 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 ----------- @@ -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,14 +62,23 @@ produced by --stat etc. Note that only message is considered, if also a diff is shown its size is not included. +:: + 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 that match the specified paths came to be. See "History 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[] diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index c308e9153..31af7f273 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 ----------- @@ -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 @@ -60,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 --------------- diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index a8ff69149..d477b3f6b 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -244,11 +244,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 diff --git a/builtin/log.c b/builtin/log.c index ad46f7295..6e56a5000 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -37,7 +37,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 }; diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 240bff3ef..1fd6f8ac5 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 };