Skip to content

Commit 4ded691

Browse files
elibarzilaygitster
authored andcommitted
Reorganize `git-log' man page to clarify common diff options.
This will reduce considerably the common confusion where people miss the `--follow' option, and wonder why `-M'/`-C' is not working. * Move the diff options include to after the log-specific flags, and add a "Common diff options" subtitle before them. (These options apply only when patches are shown, which is not a common use case among newbies, so having them first is confusing.) * Move the `--follow' description to the top of the listed options. The options before that seem less important: `--full-diff' applies only when patches are shown, `--source' and `--decorate' are less useful with many common commit specifications. * Clarify that `--follow' works only for a single path argument. Signed-off-by: Eli Barzilay <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9918285 commit 4ded691

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Documentation/git-log.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ each commit introduces are shown.
2323
OPTIONS
2424
-------
2525

26-
:git-log: 1
27-
include::diff-options.txt[]
28-
2926
-<n>::
3027
Limits the number of commits to show.
3128

@@ -37,6 +34,10 @@ include::diff-options.txt[]
3734
and <until>, see "SPECIFYING REVISIONS" section in
3835
linkgit:git-rev-parse[1].
3936

37+
--follow::
38+
Continue listing the history of a file beyond renames
39+
(works only for a single file).
40+
4041
--no-decorate::
4142
--decorate[=short|full|no]::
4243
Print out the ref names of any commits that are shown. If 'short' is
@@ -56,9 +57,6 @@ include::diff-options.txt[]
5657
the specified paths; this means that "<path>..." limits only
5758
commits, and doesn't limit diff for those commits.
5859

59-
--follow::
60-
Continue listing the history of a file beyond renames/copies.
61-
6260
--log-size::
6361
Before the log message print out its size in bytes. Intended
6462
mainly for porcelain tools consumption. If git is unable to
@@ -72,6 +70,11 @@ include::diff-options.txt[]
7270
to be prefixed with "\-- " to separate them from options or
7371
refnames.
7472

73+
Common diff options
74+
~~~~~~~~~~~~~~~~~~~
75+
76+
:git-log: 1
77+
include::diff-options.txt[]
7578

7679
include::rev-list-options.txt[]
7780

0 commit comments

Comments
 (0)