Skip to content

Commit d050464

Browse files
committed
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 <[email protected]>
1 parent 90a321c commit d050464

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

git-request-pull.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ then
4848
fi
4949
fi
5050

51+
tag_name=$(git describe --exact "$head^0" 2>/dev/null)
52+
5153
test -n "$base" && test -n "$url" || usage
5254
baserev=$(git rev-parse --verify "$base"^0) &&
5355
headrev=$(git rev-parse --verify "$head"^0) || exit
@@ -82,8 +84,20 @@ then
8284
echo "(from the branch description for $branch local branch)"
8385
echo
8486
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
8598
echo "----------------------------------------------------------------"
8699
fi &&
100+
87101
git shortlog ^$baserev $headrev &&
88102
git diff -M --stat --summary $patch $merge_base..$headrev || status=1
89103

t/t5150-request-pull.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ test_expect_success 'setup: two scripts for reading pull requests' '
8686
s/$downstream_url_for_sed/URL/g
8787
s/for-upstream/BRANCH/g
8888
s/mnemonic.txt/FILENAME/g
89+
s/^version [0-9]/VERSION/
8990
/^ FILENAME | *[0-9]* [-+]*\$/ b diffstat
9091
/^AUTHOR ([0-9]*):\$/ b shortlog
9192
p
@@ -200,6 +201,9 @@ test_expect_success 'pull request format' '
200201
201202
SUBJECT (DATE)
202203
204+
----------------------------------------------------------------
205+
VERSION
206+
203207
----------------------------------------------------------------
204208
SHORTLOG
205209

0 commit comments

Comments
 (0)