From b3b1d7013c1f3b974574881befcd5f2aee7dd510 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 12 Jan 2010 23:01:16 +0100 Subject: set-serial.sh: use "git log --oneline" to determine the number of revision for a macro This seems to be more reliable (and easier) than the previous 'grep -c' approach. --- set-serial.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'set-serial.sh') diff --git a/set-serial.sh b/set-serial.sh index fe9b442..08cbe24 100755 --- a/set-serial.sh +++ b/set-serial.sh @@ -14,7 +14,7 @@ set-serial-number() for n in "$@"; do echo "$n ... " # Determine the number of revisions that have occurred to the macro. - revision=$(git log -- "$n" | egrep -c '^commit [0-9a-f]') + revision=$(git log --oneline -- "$n" | wc -l) # Update the serial number in the m4 file. set-serial-number "$n" "$revision" # Check whether git regards the file as "modified" now. If it does, -- cgit v1.2.1