Skip to contentSkip to conversation

Add git-request-pull-script, a short script that generates a summary of pending changes

PATCH In review Ryan Anderson 1 participant 2 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 Makefile                |    3 ++-
 git-request-pull-script |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)
 create mode 100755 git-request-pull-script

834527420cf55d1a11a77372704229e2701108a4

Makefile +2 -1
@@ -37,7 +37,8 @@ SCRIPTS=git git-apply-patch-script git-m
 	gitk git-cherry git-rebase-script git-relink-script git-repack-script \
 	git-format-patch-script git-sh-setup-script git-push-script \
 	git-branch-script git-parse-remote git-verify-tag-script \
-	git-ls-remote-script git-clone-dumb-http git-rename-script
+	git-ls-remote-script git-clone-dumb-http git-rename-script \
+	git-request-pull-script
 
 PROG=   git-update-cache git-diff-files git-init-db git-write-tree \
 	git-read-tree git-commit-tree git-cat-file git-fsck-cache \
git-request-pull-script new file +36 -0
new file mode 100755
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+# Copyright 2005, Ryan Anderson <[email protected]>
+#
+# 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"
+
Signature · 2 lines
Ryan Anderson
  sometimes Pug Majere
#1 lore raw
Quoted 2 lines · Ryan Anderson

A short message requesting a pull from the repository is also included.

And, an example (which has a correct version of my fixes to git-rename-script included in it.)

To generate this I used:
git request-pull origin x rsync://h4x0r5.com/git-ryan.git/

The git repository at:

    rsync://h4x0r5.com/git-ryan.git/

contains the following changes since commit 154d3d2dd2656c23ea04e9d1c6dd4e576a7af6de

Ryan Anderson:
Add git-request-pull-script, a short script that generates a summary of pending changes Make git-rename-script behave much better when faced with input contain Perl Update the documentation for git-tag-script to reflect current behavior. Add documentation for git-rename-script
Add support for directories to git-rename-script.

 Documentation/git-rename-script.txt |   34 ++++++++++++++++
 Documentation/git-tag-script.txt    |   12 +++--
 Makefile                            |    3 -
 git-rename-script                   |   74 +++++++++++++++++++++++++++++++++---
 git-request-pull-script             |   36 +++++++++++++++++
 5 files changed, 149 insertions(+), 10 deletions(-)
Signature · 2 lines
Ryan Anderson
  sometimes Pug Majere