Merge branch 'maint'
[git/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
806f36d4
FK
7USAGE='<commit> <url> [<head>]'
8LONG_USAGE='Summarizes the changes since <commit> to the standard output,
9and includes <url> in the message generated.'
10SUBDIRECTORY_OK='Yes'
11. git-sh-setup
ab421d2c 12
ab421d2c 13revision=$1
9969b649
JH
14url=$2
15head=${3-HEAD}
ab421d2c
RA
16
17[ "$revision" ] || usage
ab421d2c
RA
18[ "$url" ] || usage
19
ff84d327
JH
20baserev=`git-rev-parse --verify "$revision"^0` &&
21headrev=`git-rev-parse --verify "$head"^0` || exit
ab421d2c 22
9969b649
JH
23echo "The following changes since commit $baserev:"
24git log --max-count=1 --pretty=short "$baserev" |
25git-shortlog | sed -e 's/^\(.\)/ \1/'
ab421d2c 26
9969b649
JH
27echo "are found in the git repository at:"
28echo
29echo " $url"
30echo
ab421d2c 31
9969b649 32git log $baserev..$headrev | git-shortlog ;
396db813 33git diff -M --stat --summary $baserev..$headrev