Add revspec documentation for ':path', ':[0-3]:path' and git-describe
[git/jrn.git] / git-request-pull.sh
blob4319e35c628efdd86745c560d2dfe306b180fb1b
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='<commit> <url> [<head>]'
8 LONG_USAGE='Summarizes the changes since <commit> to the standard output,
9 and includes <url> in the message generated.'
10 SUBDIRECTORY_OK='Yes'
11 . git-sh-setup
13 revision=$1
14 url=$2
15 head=${3-HEAD}
17 [ "$revision" ] || usage
18 [ "$url" ] || usage
20 baserev=`git-rev-parse --verify "$revision"^0` &&
21 headrev=`git-rev-parse --verify "$head"^0` || exit
23 echo "The following changes since commit $baserev:"
24 git log --max-count=1 --pretty=short "$baserev" |
25 git-shortlog | sed -e 's/^\(.\)/ \1/'
27 echo "are found in the git repository at:"
28 echo
29 echo " $url"
30 echo
32 git log $baserev..$headrev | git-shortlog ;
33 git diff --stat --summary $baserev..$headrev