summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf73166)
raw | patch | inline | side by side (parent: cf73166)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Sep 2011 22:52:57 +0000 (15:52 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Oct 2011 21:51:26 +0000 (14:51 -0700) |
Now we have branch descriptions stored in the repository, we can
use it when preparing the request-pull message.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
use it when preparing the request-pull message.
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 438e7eb957dc3d206c4d1868415a4fd4802988b5..626cf2591ad4b01ca6c917e10b8be472929c0922 100755 (executable)
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
shift
done
-base=$1 url=$2 head=${3-HEAD} status=0
+base=$1 url=$2 head=${3-HEAD} status=0 branch_name=
+
+headref=$(git symbolic-ref -q "$head")
+if git show-ref -q --verify "$headref"
+then
+ branch_name=${headref#refs/heads/}
+ if test "z$branch_name" = "z$headref" ||
+ ! git config "branch.$branch_name.description" >/dev/null
+ then
+ branch_name=
+ fi
+fi
test -n "$base" && test -n "$url" || usage
baserev=$(git rev-parse --verify "$base"^0) &&
----------------------------------------------------------------' $headrev &&
+if test -n "$branch_name"
+then
+ echo "(from the branch description for $branch local branch)"
+ echo
+ git config "branch.$branch_name.description"
+ echo "----------------------------------------------------------------"
+fi &&
git shortlog ^$baserev $headrev &&
git diff -M --stat --summary $patch $merge_base..$headrev || status=1