File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -516,7 +516,7 @@ static int show_one_mergetag(struct commit *commit,
516516 "merged tag '%s'\n" , tag -> tag );
517517 else if ((nth = which_parent (& tag -> tagged -> oid , commit )) < 0 )
518518 strbuf_addf (& verify_message , "tag %s names a non-parent %s\n" ,
519- tag -> tag , tag -> tagged -> oid . hash );
519+ tag -> tag , oid_to_hex ( & tag -> tagged -> oid ) );
520520 else
521521 strbuf_addf (& verify_message ,
522522 "parent #%d, tagged '%s'\n" , nth + 1 , tag -> tag );
Original file line number Diff line number Diff line change @@ -1607,6 +1607,26 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
16071607 grep "^| | gpg: Good signature" actual
16081608'
16091609
1610+ test_expect_success GPG ' log --graph --show-signature for merged tag in shallow clone' '
1611+ test_when_finished "git reset --hard && git checkout master" &&
1612+ git checkout -b plain-shallow master &&
1613+ echo aaa >bar &&
1614+ git add bar &&
1615+ git commit -m bar_commit &&
1616+ git checkout --detach master &&
1617+ echo bbb >baz &&
1618+ git add baz &&
1619+ git commit -m baz_commit &&
1620+ git tag -s -m signed_tag_msg signed_tag_shallow &&
1621+ hash=$(git rev-parse HEAD) &&
1622+ git checkout plain-shallow &&
1623+ git merge --no-ff -m msg signed_tag_shallow &&
1624+ git clone --depth 1 --no-local . shallow &&
1625+ test_when_finished "rm -rf shallow" &&
1626+ git -C shallow log --graph --show-signature -n1 plain-shallow >actual &&
1627+ grep "tag signed_tag_shallow names a non-parent $hash" actual
1628+ '
1629+
16101630test_expect_success GPGSM ' log --graph --show-signature for merged tag x509' '
16111631 test_when_finished "git reset --hard && git checkout master" &&
16121632 test_config gpg.format x509 &&
You can’t perform that action at this time.
0 commit comments