1#!/bin/sh -e 2# Copyright 2005, Ryan Anderson <ryan@michonline.com> 3# 4# This file is licensed under the GPL v2, or a later version 5# at the discretion of Linus Torvalds. 6 7usage() 8{ 9echo"$0<commit> <filename> <url>" 10echo" Summarizes the changes since <commit>, stores them in <filename>" 11echo" and includes <url> in the message generated." 12exit1 13} 14 15 16revision=$1 17filename=$2 18url=$3 19 20["$revision"] || usage 21["$filename"] || usage 22["$url"] || usage 23 24baserev=`git-rev-parse$revision` 25 26( 27echo"The git repository at:" 28echo"$url" 29echo"contains the following changes since commit$baserev" 30echo"" 31 git log $revision.. | git-shortlog; 32 git diff$revision.. | diffstat ; 33) |tee$filename 34 35echo"The above message is also stored in$filename" 36