#!/bin/sh -e # Copyright 2005, Ryan Anderson # # This file is licensed under the GPL v2, or a later version # at the discretion of Linus Torvalds. usage() { echo "$0 " echo " Summarizes the changes since , stores them in " echo " and includes in the message generated." exit 1 } revision=$1 filename=$2 url=$3 [ "$revision" ] || usage [ "$filename" ] || usage [ "$url" ] || usage baserev=`git-rev-parse $revision` ( echo "The git repository at:" echo " $url" echo "contains the following changes since commit $baserev" echo "" git log $revision.. | git-shortlog ; git diff $revision.. | diffstat ; ) | tee $filename echo "The above message is also stored in $filename"