#!/bin/sh tmp=.git/summary-$$ trap 'rm -f $tmp-*' 0 since="$1" until="$2" git-rev-list --no-merges "master@{$1}..master@{$2}" >"$tmp-0.txt" top="master@{$until}" bottom="master@{$since}" num_patches=$(git rev-list --no-merges $bottom..$top | wc -l) git shortlog -s -n --no-merges $bottom..$top >"$tmp-0.txt" num_contrib=$(wc -l <"$tmp-0.txt") summary=$(git diff --stat -M $bottom..$top | tail -n 1) num_files=$(expr "$summary" : ' *\([1-9][0-9]*\) files changed') num_added=$(expr "$summary" : '.*changed, \([1-9][0-9]*\) insertions') num_deleted=$(expr "$summary" : '.*, \([1-9][0-9]*\) deletions') cat <