Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 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 | |
freku045@student.liu.se | 806f36d | 2005-12-13 23:30:31 +0100 | [diff] [blame] | 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 |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 12 | |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 13 | revision=$1 |
Junio C Hamano | 9969b64 | 2005-07-26 11:47:31 -0700 | [diff] [blame] | 14 | url=$2 |
| 15 | head=${3-HEAD} |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 16 | |
| 17 | [ "$revision" ] || usage |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 18 | [ "$url" ] || usage |
| 19 | |
Junio C Hamano | ff84d32 | 2005-08-24 14:31:36 -0700 | [diff] [blame] | 20 | baserev=`git-rev-parse --verify "$revision"^0` && |
| 21 | headrev=`git-rev-parse --verify "$head"^0` || exit |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 22 | |
Junio C Hamano | 9969b64 | 2005-07-26 11:47:31 -0700 | [diff] [blame] | 23 | echo "The following changes since commit $baserev:" |
| 24 | git log --max-count=1 --pretty=short "$baserev" | |
| 25 | git-shortlog | sed -e 's/^\(.\)/ \1/' |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 26 | |
Junio C Hamano | 9969b64 | 2005-07-26 11:47:31 -0700 | [diff] [blame] | 27 | echo "are found in the git repository at:" |
| 28 | echo |
| 29 | echo " $url" |
| 30 | echo |
Ryan Anderson | ab421d2 | 2005-07-26 03:30:36 -0400 | [diff] [blame] | 31 | |
Junio C Hamano | 9969b64 | 2005-07-26 11:47:31 -0700 | [diff] [blame] | 32 | git log $baserev..$headrev | git-shortlog ; |
Sean | 9d76812 | 2006-05-14 08:16:06 -0400 | [diff] [blame] | 33 | git diff --stat --summary $baserev..$headrev |