summaryrefslogtreecommitdiff
path: root/Documentation/rev-list-options.txt
diff options
context:
space:
mode:
authorLibravatar Thomas Rast <trast@student.ethz.ch>2010-06-10 13:47:23 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-12 09:39:06 -0700
commitf69c501832ecd6880602c55565508e70c3a013d5 (patch)
tree0249f7780dd2aac4023e4f44c7670188c7778650 /Documentation/rev-list-options.txt
parentMerge branch 'maint' (diff)
downloadtgif-f69c501832ecd6880602c55565508e70c3a013d5.tar.xz
rev-list: introduce --count option
Add a --count option that, instead of actually listing the commits, merely counts them. This is mostly geared towards script use, and to this end it acts specially when used with --left-right: it outputs the left and right counts separately. Previously, scripts would have to run a shell loop or small inline script over to achieve the same. (Without --left-right, a simple |wc -l does the job.) Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/rev-list-options.txt')
-rw-r--r--Documentation/rev-list-options.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index b9fb7a86bd..066ade9fce 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -98,6 +98,15 @@ you would get an output like this:
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
~~~~~~~~~~~~~~~