summaryrefslogtreecommitdiff
path: root/git-request-pull-script
blob: 329cfc4b8ffa63094826c1c10dc185c96b3f969d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh -e
# Copyright 2005, Ryan Anderson <ryan@michonline.com>
#
# This file is licensed under the GPL v2, or a later version
# at the discretion of Linus Torvalds.
 
usage()
{
	echo "$0 <commit> <filename> <url>"
	echo "  Summarizes the changes since <commit>, stores them in <filename>"
	echo "  and includes <url> 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"