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 --- revision.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 568f1c98d..bafa72808 100644 --- a/revision.h +++ b/revision.h @@ -57,6 +57,7 @@ struct rev_info { limited:1, unpacked:1, boundary:2, + count:1, left_right:1, rewrite_parents:1, print_parents:1, @@ -131,6 +132,10 @@ struct rev_info { /* notes-specific options: which refs to show */ struct display_notes_opt notes_opt; + + /* commit counts */ + int count_left; + int count_right; }; #define REV_TREE_SAME 0 -- cgit v1.2.1