summaryrefslogtreecommitdiff
path: root/git-request-pull-script
diff options
context:
space:
mode:
authorRyan Anderson <ryan@michonline.com>2005-07-26 07:30:36 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-07-27 18:53:47 (GMT)
commitab421d2c7886341c246544bc8dea43c66a44d909 (patch)
tree8926da43833672a1aadaa5ff2c00fff9073bf35d /git-request-pull-script
parentb55db7ba283c1f7d2ff3cbc7e351d3ae504c9b1d (diff)
downloadgit-ab421d2c7886341c246544bc8dea43c66a44d909.zip
git-ab421d2c7886341c246544bc8dea43c66a44d909.tar.gz
git-ab421d2c7886341c246544bc8dea43c66a44d909.tar.bz2
[PATCH] Add git-request-pull-script, a short script that generates a summary of pending changes
A short message requesting a pull from the repository is also included. Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-request-pull-script')
-rwxr-xr-xgit-request-pull-script36
1 files changed, 36 insertions, 0 deletions
diff --git a/git-request-pull-script b/git-request-pull-script
new file mode 100755
index 0000000..329cfc4
--- /dev/null
+++ b/git-request-pull-script
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+# Copyright 2005, Ryan Anderson <ryan@michonline.com>
+#
+# This file is licensed under the GPL v2, or a later version
+# at the discretion of Linus Torvalds.
+
+usage()
+{
+ echo "$0 <commit> <filename> <url>"
+ echo " Summarizes the changes since <commit>, stores them in <filename>"
+ echo " and includes <url> in the message generated."
+ exit 1
+}
+
+
+revision=$1
+filename=$2
+url=$3
+
+[ "$revision" ] || usage
+[ "$filename" ] || usage
+[ "$url" ] || usage
+
+baserev=`git-rev-parse $revision`
+
+(
+ echo "The git repository at:"
+ echo " $url"
+ echo "contains the following changes since commit $baserev"
+ echo ""
+ git log $revision.. | git-shortlog ;
+ git diff $revision.. | diffstat ;
+) | tee $filename
+
+echo "The above message is also stored in $filename"
+