request-pull: use the annotated tag contents
The integrator tool will start allowing to pull a signed or an annotated tag, i.e. $ git pull $there tags/for-linus and the description in the tag is used to convey a meaningful message from the lieutenant to the integrator to justify the history being pulled. Include the message in the pull request e-mail, as the same information is useful in this context, too. It would encourage the lieutenants to write meaningful messages in their signed tags. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Nov 9, 2011 at 05:05 UTC
d050464541d51ab65863218d93b351de3392f476
2 files changed
+18
git-request-pull.sh
+14
@@ -48,6 +48,8 @@ then
48
fi
49
fi
50
51
+tag_name=$(git describe --exact "$head^0" 2>/dev/null)
52
+
53
test -n "$base" && test -n "$url" || usage
54
baserev=$(git rev-parse --verify "$base"^0) &&
55
headrev=$(git rev-parse --verify "$head"^0) || exit
@@ -82,8 +84,20 @@ then
84
echo "(from the branch description for $branch local branch)"
85
echo
86
git config "branch.$branch_name.description"
87
+fi &&
88
+
89
+if test -n "$tag_name"
90
+then
91
+ git cat-file tag "$tag_name" |
92
+ sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p
93
+ echo
94
+fi &&
95
+
96
+if test -n "$branch_name" || test -n "$tag_name"
97
+then
98
echo "----------------------------------------------------------------"
99
fi &&
100
+
101
git shortlog ^$baserev $headrev &&
102
git diff -M --stat --summary $patch $merge_base..$headrev || status=1
103
t/t5150-request-pull.sh
+4
@@ -86,6 +86,7 @@ test_expect_success 'setup: two scripts for reading pull requests' '
86
s/$downstream_url_for_sed/URL/g
87
s/for-upstream/BRANCH/g
88
s/mnemonic.txt/FILENAME/g
89
+ s/^version [0-9]/VERSION/
90
/^ FILENAME | *[0-9]* [-+]*\$/ b diffstat
91
/^AUTHOR ([0-9]*):\$/ b shortlog
92
p
@@ -200,6 +201,9 @@ test_expect_success 'pull request format' '
201
202
SUBJECT (DATE)
203
204
+ ----------------------------------------------------------------
205
+ VERSION
206
+
207
----------------------------------------------------------------
208
SHORTLOG
209