Merge branch 'mg/rev-list-n-reverse-doc' into maint
* mg/rev-list-n-reverse-doc: git-log.txt,rev-list-options.txt: put option blocks in proper order git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting
This commit is contained in:
commit
df0a6aeb35
@ -25,6 +25,7 @@ OPTIONS
|
||||
|
||||
-<n>::
|
||||
Limits the number of commits to show.
|
||||
Note that this is a commit limiting option, see below.
|
||||
|
||||
<since>..<until>::
|
||||
Show only commits between the named two commits. When
|
||||
@ -72,16 +73,16 @@ produced by --stat etc.
|
||||
to be prefixed with "\-- " to separate them from options or
|
||||
refnames.
|
||||
|
||||
Common diff options
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:git-log: 1
|
||||
include::diff-options.txt[]
|
||||
|
||||
include::rev-list-options.txt[]
|
||||
|
||||
include::pretty-formats.txt[]
|
||||
|
||||
Common diff options
|
||||
-------------------
|
||||
|
||||
:git-log: 1
|
||||
include::diff-options.txt[]
|
||||
|
||||
include::diff-generate-patch.txt[]
|
||||
|
||||
Examples
|
||||
|
@ -1,164 +1,10 @@
|
||||
Commit Formatting
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
Using these options, linkgit:git-rev-list[1] will act similar to the
|
||||
more specialized family of commit log tools: linkgit:git-log[1],
|
||||
linkgit:git-show[1], and linkgit:git-whatchanged[1]
|
||||
endif::git-rev-list[]
|
||||
|
||||
include::pretty-options.txt[]
|
||||
|
||||
--relative-date::
|
||||
|
||||
Synonym for `--date=relative`.
|
||||
|
||||
--date=(relative|local|default|iso|rfc|short|raw)::
|
||||
|
||||
Only takes effect for dates shown in human-readable format, such
|
||||
as when using "--pretty". `log.date` config variable sets a default
|
||||
value for log command's --date option.
|
||||
+
|
||||
`--date=relative` shows dates relative to the current time,
|
||||
e.g. "2 hours ago".
|
||||
+
|
||||
`--date=local` shows timestamps in user's local timezone.
|
||||
+
|
||||
`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
|
||||
+
|
||||
`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822
|
||||
format, often found in E-mail messages.
|
||||
+
|
||||
`--date=short` shows only date but not time, in `YYYY-MM-DD` format.
|
||||
+
|
||||
`--date=raw` shows the date in the internal raw git format `%s %z` format.
|
||||
+
|
||||
`--date=default` shows timestamps in the original timezone
|
||||
(either committer's or author's).
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--header::
|
||||
|
||||
Print the contents of the commit in raw-format; each record is
|
||||
separated with a NUL character.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--parents::
|
||||
|
||||
Print also the parents of the commit (in the form "commit parent...").
|
||||
Also enables parent rewriting, see 'History Simplification' below.
|
||||
|
||||
--children::
|
||||
|
||||
Print also the children of the commit (in the form "commit child...").
|
||||
Also enables parent rewriting, see 'History Simplification' below.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--timestamp::
|
||||
Print the raw commit timestamp.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--left-right::
|
||||
|
||||
Mark which side of a symmetric diff a commit is reachable from.
|
||||
Commits from the left side are prefixed with `<` and those from
|
||||
the right with `>`. If combined with `--boundary`, those
|
||||
commits are prefixed with `-`.
|
||||
+
|
||||
For example, if you have this topology:
|
||||
+
|
||||
-----------------------------------------------------------------------
|
||||
y---b---b branch B
|
||||
/ \ /
|
||||
/ .
|
||||
/ / \
|
||||
o---x---a---a branch A
|
||||
-----------------------------------------------------------------------
|
||||
+
|
||||
you would get an output like this:
|
||||
+
|
||||
-----------------------------------------------------------------------
|
||||
$ git rev-list --left-right --boundary --pretty=oneline A...B
|
||||
|
||||
>bbbbbbb... 3rd on b
|
||||
>bbbbbbb... 2nd on b
|
||||
<aaaaaaa... 3rd on a
|
||||
<aaaaaaa... 2nd on a
|
||||
-yyyyyyy... 1st on b
|
||||
-xxxxxxx... 1st on a
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
--graph::
|
||||
|
||||
Draw a text-based graphical representation of the commit history
|
||||
on the left hand side of the output. This may cause extra lines
|
||||
to be printed in between commits, in order for the graph history
|
||||
to be drawn properly.
|
||||
+
|
||||
This enables parent rewriting, see 'History Simplification' below.
|
||||
+
|
||||
This implies the '--topo-order' option by default, but the
|
||||
'--date-order' option may also be specified.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--count::
|
||||
Print a number stating how many commits would have been
|
||||
listed, and suppress all other output. When used together
|
||||
with '--left-right', instead print the counts for left and
|
||||
right commits, separated by a tab.
|
||||
endif::git-rev-list[]
|
||||
|
||||
|
||||
ifndef::git-rev-list[]
|
||||
Diff Formatting
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Below are listed options that control the formatting of diff output.
|
||||
Some of them are specific to linkgit:git-rev-list[1], however other diff
|
||||
options may be given. See linkgit:git-diff-files[1] for more options.
|
||||
|
||||
-c::
|
||||
|
||||
With this option, diff output for a merge commit
|
||||
shows the differences from each of the parents to the merge result
|
||||
simultaneously instead of showing pairwise diff between a parent
|
||||
and the result one at a time. Furthermore, it lists only files
|
||||
which were modified from all parents.
|
||||
|
||||
--cc::
|
||||
|
||||
This flag implies the '-c' options and further compresses the
|
||||
patch output by omitting uninteresting hunks whose contents in
|
||||
the parents have only two variants and the merge result picks
|
||||
one of them without modification.
|
||||
|
||||
-m::
|
||||
|
||||
This flag makes the merge commits show the full diff like
|
||||
regular commits; for each merge parent, a separate log entry
|
||||
and diff is generated. An exception is that only diff against
|
||||
the first parent is shown when '--first-parent' option is given;
|
||||
in that case, the output represents the changes the merge
|
||||
brought _into_ the then-current branch.
|
||||
|
||||
-r::
|
||||
|
||||
Show recursive diffs.
|
||||
|
||||
-t::
|
||||
|
||||
Show the tree objects in the diff output. This implies '-r'.
|
||||
|
||||
-s::
|
||||
Suppress diff output.
|
||||
endif::git-rev-list[]
|
||||
|
||||
Commit Limiting
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Besides specifying a range of commits that should be listed using the
|
||||
special notations explained in the description, additional commit
|
||||
limiting may be applied.
|
||||
limiting may be applied. Note that they are applied before commit
|
||||
ordering and formatting options, such as '--reverse'.
|
||||
|
||||
--
|
||||
|
||||
@ -735,3 +581,158 @@ These options are mostly targeted for packing of git repositories.
|
||||
--do-walk::
|
||||
|
||||
Overrides a previous --no-walk.
|
||||
|
||||
Commit Formatting
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
Using these options, linkgit:git-rev-list[1] will act similar to the
|
||||
more specialized family of commit log tools: linkgit:git-log[1],
|
||||
linkgit:git-show[1], and linkgit:git-whatchanged[1]
|
||||
endif::git-rev-list[]
|
||||
|
||||
include::pretty-options.txt[]
|
||||
|
||||
--relative-date::
|
||||
|
||||
Synonym for `--date=relative`.
|
||||
|
||||
--date=(relative|local|default|iso|rfc|short|raw)::
|
||||
|
||||
Only takes effect for dates shown in human-readable format, such
|
||||
as when using "--pretty". `log.date` config variable sets a default
|
||||
value for log command's --date option.
|
||||
+
|
||||
`--date=relative` shows dates relative to the current time,
|
||||
e.g. "2 hours ago".
|
||||
+
|
||||
`--date=local` shows timestamps in user's local timezone.
|
||||
+
|
||||
`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
|
||||
+
|
||||
`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822
|
||||
format, often found in E-mail messages.
|
||||
+
|
||||
`--date=short` shows only date but not time, in `YYYY-MM-DD` format.
|
||||
+
|
||||
`--date=raw` shows the date in the internal raw git format `%s %z` format.
|
||||
+
|
||||
`--date=default` shows timestamps in the original timezone
|
||||
(either committer's or author's).
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--header::
|
||||
|
||||
Print the contents of the commit in raw-format; each record is
|
||||
separated with a NUL character.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--parents::
|
||||
|
||||
Print also the parents of the commit (in the form "commit parent...").
|
||||
Also enables parent rewriting, see 'History Simplification' below.
|
||||
|
||||
--children::
|
||||
|
||||
Print also the children of the commit (in the form "commit child...").
|
||||
Also enables parent rewriting, see 'History Simplification' below.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--timestamp::
|
||||
Print the raw commit timestamp.
|
||||
endif::git-rev-list[]
|
||||
|
||||
--left-right::
|
||||
|
||||
Mark which side of a symmetric diff a commit is reachable from.
|
||||
Commits from the left side are prefixed with `<` and those from
|
||||
the right with `>`. If combined with `--boundary`, those
|
||||
commits are prefixed with `-`.
|
||||
+
|
||||
For example, if you have this topology:
|
||||
+
|
||||
-----------------------------------------------------------------------
|
||||
y---b---b branch B
|
||||
/ \ /
|
||||
/ .
|
||||
/ / \
|
||||
o---x---a---a branch A
|
||||
-----------------------------------------------------------------------
|
||||
+
|
||||
you would get an output like this:
|
||||
+
|
||||
-----------------------------------------------------------------------
|
||||
$ git rev-list --left-right --boundary --pretty=oneline A...B
|
||||
|
||||
>bbbbbbb... 3rd on b
|
||||
>bbbbbbb... 2nd on b
|
||||
<aaaaaaa... 3rd on a
|
||||
<aaaaaaa... 2nd on a
|
||||
-yyyyyyy... 1st on b
|
||||
-xxxxxxx... 1st on a
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
--graph::
|
||||
|
||||
Draw a text-based graphical representation of the commit history
|
||||
on the left hand side of the output. This may cause extra lines
|
||||
to be printed in between commits, in order for the graph history
|
||||
to be drawn properly.
|
||||
+
|
||||
This enables parent rewriting, see 'History Simplification' below.
|
||||
+
|
||||
This implies the '--topo-order' option by default, but the
|
||||
'--date-order' option may also be specified.
|
||||
|
||||
ifdef::git-rev-list[]
|
||||
--count::
|
||||
Print a number stating how many commits would have been
|
||||
listed, and suppress all other output. When used together
|
||||
with '--left-right', instead print the counts for left and
|
||||
right commits, separated by a tab.
|
||||
endif::git-rev-list[]
|
||||
|
||||
|
||||
ifndef::git-rev-list[]
|
||||
Diff Formatting
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Below are listed options that control the formatting of diff output.
|
||||
Some of them are specific to linkgit:git-rev-list[1], however other diff
|
||||
options may be given. See linkgit:git-diff-files[1] for more options.
|
||||
|
||||
-c::
|
||||
|
||||
With this option, diff output for a merge commit
|
||||
shows the differences from each of the parents to the merge result
|
||||
simultaneously instead of showing pairwise diff between a parent
|
||||
and the result one at a time. Furthermore, it lists only files
|
||||
which were modified from all parents.
|
||||
|
||||
--cc::
|
||||
|
||||
This flag implies the '-c' options and further compresses the
|
||||
patch output by omitting uninteresting hunks whose contents in
|
||||
the parents have only two variants and the merge result picks
|
||||
one of them without modification.
|
||||
|
||||
-m::
|
||||
|
||||
This flag makes the merge commits show the full diff like
|
||||
regular commits; for each merge parent, a separate log entry
|
||||
and diff is generated. An exception is that only diff against
|
||||
the first parent is shown when '--first-parent' option is given;
|
||||
in that case, the output represents the changes the merge
|
||||
brought _into_ the then-current branch.
|
||||
|
||||
-r::
|
||||
|
||||
Show recursive diffs.
|
||||
|
||||
-t::
|
||||
|
||||
Show the tree objects in the diff output. This implies '-r'.
|
||||
|
||||
-s::
|
||||
Suppress diff output.
|
||||
endif::git-rev-list[]
|
||||
|
Loading…
Reference in New Issue
Block a user