From f69c501832ecd6880602c55565508e70c3a013d5 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Thu, 10 Jun 2010 13:47:23 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/rev-list-options.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/rev-list-options.txt') 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 ~~~~~~~~~~~~~~~ -- cgit v1.2.3