Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <harald@gigawatt.nl>2020-02-29 16:07:57 +0300
committerJunio C Hamano <gitster@pobox.com>2020-03-02 23:34:00 +0300
commit237a28173feffc9bdec5aa669aa17fba1ac7c279 (patch)
treeb1733ece07384ae88acf34c6bf89599a3792b5c1 /t/t4202-log.sh
parentd9589d4051537c387b70dc76e430c61b4c85a86d (diff)
show_one_mergetag: print non-parent in hex form.
When a mergetag names a non-parent, which can occur after a shallow clone, its hash was previously printed as raw data. Print it in hex form instead. Signed-off-by: Harald van Dijk <harald@gigawatt.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 819c24d10e..eecac1801b 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1596,6 +1596,26 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
grep "^| | gpg: Good signature" actual
'
+test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '
+ test_when_finished "git reset --hard && git checkout master" &&
+ git checkout -b plain-shallow master &&
+ echo aaa >bar &&
+ git add bar &&
+ git commit -m bar_commit &&
+ git checkout --detach master &&
+ echo bbb >baz &&
+ git add baz &&
+ git commit -m baz_commit &&
+ git tag -s -m signed_tag_msg signed_tag_shallow &&
+ hash=$(git rev-parse HEAD) &&
+ git checkout plain-shallow &&
+ git merge --no-ff -m msg signed_tag_shallow &&
+ git clone --depth 1 --no-local . shallow &&
+ test_when_finished "rm -rf shallow" &&
+ git -C shallow log --graph --show-signature -n1 plain-shallow >actual &&
+ grep "tag signed_tag_shallow names a non-parent $hash" actual
+'
+
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '
test_when_finished "git reset --hard && git checkout master" &&
test_config gpg.format x509 &&