blob: 4319e35c628efdd86745c560d2dfe306b180fb1b [file] [log] [blame]
Ryan Andersonab421d22005-07-26 03:30:36 -04001#!/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.se806f36d2005-12-13 23:30:31 +01007USAGE='<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
Ryan Andersonab421d22005-07-26 03:30:36 -040012
Ryan Andersonab421d22005-07-26 03:30:36 -040013revision=$1
Junio C Hamano9969b642005-07-26 11:47:31 -070014url=$2
15head=${3-HEAD}
Ryan Andersonab421d22005-07-26 03:30:36 -040016
17[ "$revision" ] || usage
Ryan Andersonab421d22005-07-26 03:30:36 -040018[ "$url" ] || usage
19
Junio C Hamanoff84d322005-08-24 14:31:36 -070020baserev=`git-rev-parse --verify "$revision"^0` &&
21headrev=`git-rev-parse --verify "$head"^0` || exit
Ryan Andersonab421d22005-07-26 03:30:36 -040022
Junio C Hamano9969b642005-07-26 11:47:31 -070023echo "The following changes since commit $baserev:"
24git log --max-count=1 --pretty=short "$baserev" |
25git-shortlog | sed -e 's/^\(.\)/ \1/'
Ryan Andersonab421d22005-07-26 03:30:36 -040026
Junio C Hamano9969b642005-07-26 11:47:31 -070027echo "are found in the git repository at:"
28echo
29echo " $url"
30echo
Ryan Andersonab421d22005-07-26 03:30:36 -040031
Junio C Hamano9969b642005-07-26 11:47:31 -070032git log $baserev..$headrev | git-shortlog ;
Sean9d768122006-05-14 08:16:06 -040033git diff --stat --summary $baserev..$headrev