Skip to content

Commit 8df99dc

Browse files
committed
Revert "build: remove git mailmap usage"
This reverts commit 426acbc. Reverting because the latest dev cluster has been updated with git 2.43.0 now, which supports the mailmap feature in git for-each-ref command Signed-off-by: Ye Xiang <[email protected]>
1 parent 3350336 commit 8df99dc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

contrib/scripts/generate_debian_changelog.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/bin/bash
22

3+
fmt=" \
4+
tagname=%(refname:short) \
5+
tagger_name=%(taggername:mailmap) \
6+
tagger_email=%(taggeremail:mailmap) \
7+
tagger_when=%(taggerdate) \
8+
committer_name=%(committername:mailmap) \
9+
committer_email=%(committeremail:mailmap) \
10+
committer_when=%(committerdate) \
11+
"
12+
313
if [ $# -eq 0 ]; then
414
tag=HEAD
515
else
@@ -12,8 +22,7 @@ if [ $? -ne 0 ]; then
1222
exit 0
1323
fi
1424

15-
git log --use-mailmap --no-walk --format="tagname='%D' tagger_name='%aN' tagger_email='<%aE>' tagger_when='%ad' committer_name='%cN' committer_email='<%cE>' committer_when='%cd'" \
16-
--date="format:%a %b %-d %T %Y %z" $(git tag --merged "$tag") | sed "s/tagname='tag: \([^,']*\)'/tagname='\1'/" | {
25+
git for-each-ref --shell --sort=-v:refname --format "$fmt" --merged "$tag" | {
1726
while read line; do
1827
eval $line
1928
(echo ${tagname} | grep -qE '^v[0-9]') || continue

0 commit comments

Comments
 (0)