]> git.ipfire.org Git - thirdparty/git.git/blame - git-request-pull.sh
Big tool rename.
[thirdparty/git.git] / git-request-pull.sh
CommitLineData
ab421d2c
RA
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{
9969b649
JH
9 echo "$0 <commit> <url> [ <head> ]"
10 echo " Summarizes the changes since <commit> to the standard output,"
ab421d2c
RA
11 echo " and includes <url> in the message generated."
12 exit 1
13}
14
ab421d2c 15revision=$1
9969b649
JH
16url=$2
17head=${3-HEAD}
ab421d2c
RA
18
19[ "$revision" ] || usage
ab421d2c
RA
20[ "$url" ] || usage
21
ff84d327
JH
22baserev=`git-rev-parse --verify "$revision"^0` &&
23headrev=`git-rev-parse --verify "$head"^0` || exit
ab421d2c 24
9969b649
JH
25echo "The following changes since commit $baserev:"
26git log --max-count=1 --pretty=short "$baserev" |
27git-shortlog | sed -e 's/^\(.\)/ \1/'
ab421d2c 28
9969b649
JH
29echo "are found in the git repository at:"
30echo
31echo " $url"
32echo
ab421d2c 33
9969b649
JH
34git log $baserev..$headrev | git-shortlog ;
35git diff $baserev..$headrev | git-apply --stat --summary