summaryrefslogtreecommitdiff
path: root/Documentation/rev-list-options.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/rev-list-options.txt')
-rw-r--r--Documentation/rev-list-options.txt159
1 files changed, 117 insertions, 42 deletions
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 5bf2a85..00ccf68 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -25,6 +25,11 @@ ordering and formatting options, such as `--reverse`.
--after=<date>::
Show commits more recent than a specific date.
+--since-as-filter=<date>::
+ Show all commits more recent than a specific date. This visits
+ all commits in the range, rather than stopping at the first commit which
+ is older than a specific date.
+
--until=<date>::
--before=<date>::
Show commits older than a specific date.
@@ -51,7 +56,7 @@ endif::git-rev-list[]
error to use this option unless `--walk-reflogs` is in use.
--grep=<pattern>::
- Limit the commits output to ones with log message that
+ Limit the commits output to ones with a log message that
matches the specified pattern (regular expression). With
more than one `--grep=<pattern>`, commits whose message
matches any of the given patterns are chosen (but see
@@ -67,7 +72,7 @@ endif::git-rev-list[]
instead of ones that match at least one.
--invert-grep::
- Limit the commits output to ones with log message that do not
+ Limit the commits output to ones with a log message that do not
match the pattern specified with `--grep=<pattern>`.
-i::
@@ -122,22 +127,34 @@ again. Equivalent forms are `--min-parents=0` (any commit has 0 or more
parents) and `--max-parents=-1` (negative numbers denote no upper limit).
--first-parent::
- Follow only the first parent commit upon seeing a merge
- commit. This option can give a better overview when
- viewing the evolution of a particular topic branch,
- because merges into a topic branch tend to be only about
- adjusting to updated upstream from time to time, and
- this option allows you to ignore the individual commits
- brought in to your history by such a merge.
+ When finding commits to include, follow only the first
+ parent commit upon seeing a merge commit. This option
+ can give a better overview when viewing the evolution of
+ a particular topic branch, because merges into a topic
+ branch tend to be only about adjusting to updated upstream
+ from time to time, and this option allows you to ignore
+ the individual commits brought in to your history by such
+ a merge.
ifdef::git-log[]
+
This option also changes default diff format for merge commits
to `first-parent`, see `--diff-merges=first-parent` for details.
endif::git-log[]
+--exclude-first-parent-only::
+ When finding commits to exclude (with a '{caret}'), follow only
+ the first parent commit upon seeing a merge commit.
+ This can be used to find the set of changes in a topic branch
+ from the point where it diverged from the remote branch, given
+ that arbitrary merges can be valid topic branch changes.
+
--not::
Reverses the meaning of the '{caret}' prefix (or lack thereof)
for all following revision specifiers, up to the next `--not`.
+ When used on the command line before --stdin, the revisions passed
+ through stdin will not be affected by it. Conversely, when passed
+ via standard input, the revisions passed on the command line will
+ not be affected by it.
--all::
Pretend as if all the refs in `refs/`, along with `HEAD`, are
@@ -182,6 +199,14 @@ respectively, and they must begin with `refs/` when applied to `--glob`
or `--all`. If a trailing '/{asterisk}' is intended, it must be given
explicitly.
+--exclude-hidden=[fetch|receive|uploadpack]::
+ Do not include refs that would be hidden by `git-fetch`,
+ `git-receive-pack` or `git-upload-pack` by consulting the appropriate
+ `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs`
+ configuration along with `transfer.hideRefs` (see
+ linkgit:git-config[1]). This option affects the next pseudo-ref option
+ `--all` or `--glob` and is cleared after processing them.
+
--reflog::
Pretend as if all objects mentioned by reflogs are listed on the
command line as `<commit>`.
@@ -215,10 +240,13 @@ ifndef::git-rev-list[]
endif::git-rev-list[]
--stdin::
- In addition to the '<commit>' listed on the command
- line, read them from the standard input. If a `--` separator is
- seen, stop reading commits and start reading paths to limit the
- result.
+ In addition to getting arguments from the command line, read
+ them from standard input as well. This accepts commits and
+ pseudo-options like `--all` and `--glob=`. When a `--` separator
+ is seen, the following input is treated as paths and used to
+ limit the result. Flags like `--not` which are read via standard input
+ are only respected for arguments passed in the same way and will not
+ influence any subsequent command line arguments.
ifdef::git-rev-list[]
--quiet::
@@ -229,6 +257,7 @@ ifdef::git-rev-list[]
to `/dev/null` as the output does not have to be formatted.
--disk-usage::
+--disk-usage=human::
Suppress normal output; instead, print the sum of the bytes used
for on-disk storage by the selected commits or objects. This is
equivalent to piping the output into `git cat-file
@@ -236,6 +265,8 @@ ifdef::git-rev-list[]
faster (especially with `--use-bitmap-index`). See the `CAVEATS`
section in linkgit:git-cat-file[1] for the limitations of what
"on-disk storage" means.
+ With the optional value `human`, on-disk storage size is shown
+ in human-readable string(e.g. 12.24 Kib, 3.50 Mib).
endif::git-rev-list[]
--cherry-mark::
@@ -285,12 +316,12 @@ list.
With `--pretty` format other than `oneline` and `reference` (for obvious reasons),
this causes the output to have two extra lines of information
taken from the reflog. The reflog designator in the output may be shown
-as `ref@{Nth}` (where `Nth` is the reverse-chronological index in the
-reflog) or as `ref@{timestamp}` (with the timestamp for that entry),
+as `ref@{<Nth>}` (where _<Nth>_ is the reverse-chronological index in the
+reflog) or as `ref@{<timestamp>}` (with the _<timestamp>_ for that entry),
depending on a few rules:
+
--
-1. If the starting point is specified as `ref@{Nth}`, show the index
+1. If the starting point is specified as `ref@{<Nth>}`, show the index
format.
+
2. If the starting point was specified as `ref@{now}`, show the
@@ -310,8 +341,11 @@ See also linkgit:git-reflog[1].
Under `--pretty=reference`, this information will not be shown at all.
--merge::
- After a failed merge, show refs that touch files having a
- conflict and don't exist on all heads to merge.
+ Show commits touching conflicted paths in the range `HEAD...<other>`,
+ where `<other>` is the first existing pseudoref in `MERGE_HEAD`,
+ `CHERRY_PICK_HEAD`, `REVERT_HEAD` or `REBASE_HEAD`. Only works
+ when the index has unmerged entries. This option can be used to show
+ relevant commits when resolving conflicts from a 3-way merge.
--boundary::
Output excluded boundary commits. Boundary commits are
@@ -376,12 +410,14 @@ Default mode::
merges from the resulting history, as there are no selected
commits contributing to this merge.
---ancestry-path::
+--ancestry-path[=<commit>]::
When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), only display commits that exist
- directly on the ancestry chain between the 'commit1' and
- 'commit2', i.e. commits that are both descendants of 'commit1',
- and ancestors of 'commit2'.
+ or 'commit2 {caret}commit1'), only display commits in that range
+ that are ancestors of <commit>, descendants of <commit>, or
+ <commit> itself. If no commit is specified, use 'commit1' (the
+ excluded part of the range) as <commit>. Can be passed multiple
+ times; if so, a commit is included if it is any of the commits
+ given or if it is an ancestor or descendant of one of them.
A more detailed explanation follows.
@@ -555,11 +591,10 @@ Note the major differences in `N`, `P`, and `Q` over `--full-history`:
There is another simplification mode available:
---ancestry-path::
- Limit the displayed commits to those directly on the ancestry
- chain between the ``from'' and ``to'' commits in the given commit
- range. I.e. only display commits that are ancestor of the ``to''
- commit and descendants of the ``from'' commit.
+--ancestry-path[=<commit>]::
+ Limit the displayed commits to those which are an ancestor of
+ <commit>, or which are a descendant of <commit>, or are <commit>
+ itself.
+
As an example use case, consider the following commit history:
+
@@ -591,6 +626,29 @@ option does. Applied to the 'D..M' range, it results in:
\
L--M
-----------------------------------------------------------------------
++
+We can also use `--ancestry-path=D` instead of `--ancestry-path` which
+means the same thing when applied to the 'D..M' range but is just more
+explicit.
++
+If we instead are interested in a given topic within this range, and all
+commits affected by that topic, we may only want to view the subset of
+`D..M` which contain that topic in their ancestry path. So, using
+`--ancestry-path=H D..M` for example would result in:
++
+-----------------------------------------------------------------------
+ E
+ \
+ G---H---I---J
+ \
+ L--M
+-----------------------------------------------------------------------
++
+Whereas `--ancestry-path=K D..M` would result in
++
+-----------------------------------------------------------------------
+ K---------------L--M
+-----------------------------------------------------------------------
Before discussing another option, `--show-pulls`, we need to
create a new example history.
@@ -646,7 +704,7 @@ Here, the merge commits `O` and `P` contribute extra noise, as they did
not actually contribute a change to `file.txt`. They only merged a topic
that was based on an older version of `file.txt`. This is a common
issue in repositories using a workflow where many contributors work in
-parallel and merge their topic branches along a single trunk: manu
+parallel and merge their topic branches along a single trunk: many
unrelated merges appear in the `--full-history` results.
When using the `--simplify-merges` option, the commits `O` and `P`
@@ -842,7 +900,7 @@ ifdef::git-rev-list[]
Print the object IDs of any object referenced by the listed
commits. `--objects foo ^bar` thus means ``send me
all object IDs which I need to download if I have the commit
- object _bar_ but not _foo_''.
+ object _bar_ but not _foo_''. See also `--object-names` below.
--in-commit-order::
Print tree and blob ids in order of the commits. The tree
@@ -872,7 +930,12 @@ ifdef::git-rev-list[]
--object-names::
Only useful with `--objects`; print the names of the object IDs
- that are found. This is the default behavior.
+ that are found. This is the default behavior. Note that the
+ "name" of each object is ambiguous, and mostly intended as a
+ hint for packing objects. In particular: no distinction is made between
+ the names of tags, trees, and blobs; path names may be modified
+ to remove newlines; and if an object would appear multiple times
+ with different names, only one name is shown.
--no-object-names::
Only useful with `--objects`; does not print the names of the object
@@ -887,17 +950,17 @@ ifdef::git-rev-list[]
+
The form '--filter=blob:none' omits all blobs.
+
-The form '--filter=blob:limit=<n>[kmg]' omits blobs larger than n bytes
-or units. n may be zero. The suffixes k, m, and g can be used to name
-units in KiB, MiB, or GiB. For example, 'blob:limit=1k' is the same
-as 'blob:limit=1024'.
+The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
+bytes or units. n may be zero. The suffixes k, m, and g can be used
+to name units in KiB, MiB, or GiB. For example, 'blob:limit=1k'
+is the same as 'blob:limit=1024'.
+
The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects
which are not of the requested type.
+
The form '--filter=sparse:oid=<blob-ish>' uses a sparse-checkout
specification contained in the blob (or blob-expression) '<blob-ish>'
-to omit blobs that would not be not required for a sparse checkout on
+to omit blobs that would not be required for a sparse checkout on
the requested refs.
+
The form '--filter=tree:<depth>' omits all blobs and trees whose depth
@@ -959,6 +1022,10 @@ Unexpected missing objects will raise an error.
+
The form '--missing=print' is like 'allow-any', but will also print a
list of the missing objects. Object IDs are prefixed with a ``?'' character.
++
+If some tips passed to the traversal are missing, they will be
+considered as missing too, and the traversal will ignore them. In case
+we cannot get their Object ID though, an error will be raised.
--exclude-promisor-objects::
(For internal use only.) Prefilter object traversal at
@@ -1047,23 +1114,31 @@ omitted.
has no effect.
`--date=format:...` feeds the format `...` to your system `strftime`,
-except for %z and %Z, which are handled internally.
+except for %s, %z, and %Z, which are handled internally.
Use `--date=format:%c` to show the date in your system locale's
preferred format. See the `strftime` manual for a complete list of
format placeholders. When using `-local`, the correct syntax is
`--date=format-local:...`.
-`--date=default` is the default format, and is similar to
-`--date=rfc2822`, with a few exceptions:
+`--date=default` is the default format, and is based on ctime(3)
+output. It shows a single line with three-letter day of the week,
+three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
+format, followed by 4-digit year, plus timezone information, unless
+the local time zone is used, e.g. `Thu Jan 1 00:00:00 1970 +0000`.
--
- - there is no comma after the day-of-week
-
- - the time zone is omitted when the local time zone is used
ifdef::git-rev-list[]
--header::
Print the contents of the commit in raw-format; each record is
separated with a NUL character.
+
+--no-commit-header::
+ Suppress the header line containing "commit" and the object ID printed before
+ the specified format. This has no effect on the built-in formats; only custom
+ formats are affected.
+
+--commit-header::
+ Overrides a previous `--no-commit-header`.
endif::git-rev-list[]
--parents::