[PATCH] Add git-request-pull-script, a short script that generates a summary of pendi...
[git/jnareb-git/bp-gitweb.git] / git-request-pull-script
blob329cfc4b8ffa63094826c1c10dc185c96b3f969d
1 #!/bin/sh -e
2 # Copyright 2005, Ryan Anderson <ryan@michonline.com>
4 # This file is licensed under the GPL v2, or a later version
5 # at the discretion of Linus Torvalds.
7 usage()
9 echo "$0 <commit> <filename> <url>"
10 echo " Summarizes the changes since <commit>, stores them in <filename>"
11 echo " and includes <url> in the message generated."
12 exit 1
16 revision=$1
17 filename=$2
18 url=$3
20 [ "$revision" ] || usage
21 [ "$filename" ] || usage
22 [ "$url" ] || usage
24 baserev=`git-rev-parse $revision`
27 echo "The git repository at:"
28 echo " $url"
29 echo "contains the following changes since commit $baserev"
30 echo ""
31 git log $revision.. | git-shortlog ;
32 git diff $revision.. | diffstat ;
33 ) | tee $filename
35 echo "The above message is also stored in $filename"