summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b65954d)
raw | patch | inline | side by side (parent: b65954d)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Jul 2009 21:27:47 +0000 (14:27 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 29 Jul 2009 18:02:49 +0000 (11:02 -0700) |
Allow git request-pull to append diff body into the pull request.
It's useful for small series of commits.
Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It's useful for small series of commits.
Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-request-pull.sh | patch | blob | history |
diff --git a/git-request-pull.sh b/git-request-pull.sh
index fd95beadab6aa01fc3fb26c7d72ba182201f8502..630ceddf0356429f7ff71d280ee1056a2eb939c6 100755 (executable)
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
LONG_USAGE='Summarizes the changes between two commits to the standard output,
and includes the given URL in the generated summary.'
SUBDIRECTORY_OK='Yes'
-OPTIONS_SPEC=
+OPTIONS_SPEC='git request-pull [options] start url [end]
+--
+p show patch text as well
+'
+
. git-sh-setup
. git-parse-remote
GIT_PAGER=
export GIT_PAGER
+patch=
+while case "$#" in 0) break ;; esac
+do
+ case "$1" in
+ -p)
+ patch=-p ;;
+ --)
+ shift; break ;;
+ -*)
+ usage ;;
+ *)
+ break ;;
+ esac
+ shift
+done
+
base=$1
url=$2
head=${3-HEAD}
echo
git shortlog ^$baserev $headrev
-git diff -M --stat --summary $merge_base $headrev
+git diff -M --stat --summary $patch $merge_base..$headrev
exit $status