summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 10:28:51 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-22 10:28:51 -0700
commita1991f173460d4cc3bffecf4e2840ab74a8f3291 (patch)
tree59cab75bde52174a9fdb80daa5496b0206b23fcd
parent514dd21326db3d0f429b9fa9cd5fdbd0d2c417d1 (diff)
parentcf3983d1ff861657c8813feb7df82a74a29d06bc (diff)
downloadgit-a1991f173460d4cc3bffecf4e2840ab74a8f3291.tar.gz
Merge branch 'zk/log-graph-showsig' into maint
* zk/log-graph-showsig: log: fix indentation for --graph --show-signature
-rw-r--r--log-tree.c1
-rwxr-xr-xt/t4202-log.sh31
2 files changed, 32 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index c13184aafb..f87b7e891a 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -365,6 +365,7 @@ static void show_sig_lines(struct rev_info *opt, int status, const char *bol)
eol = strchrnul(bol, '\n');
printf("%s%.*s%s%s", color, (int)(eol - bol), bol, reset,
*eol ? "\n" : "");
+ graph_show_oneline(opt->graph);
bol = (*eol) ? (eol + 1) : eol;
}
}
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index cb03d28769..99ab7ca21f 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -3,6 +3,7 @@
test_description='git log'
. ./test-lib.sh
+. "$TEST_DIRECTORY/lib-gpg.sh"
test_expect_success setup '
@@ -841,4 +842,34 @@ test_expect_success 'dotdot is a parent directory' '
test_cmp expect actual
'
+test_expect_success GPG 'log --graph --show-signature' '
+ test_when_finished "git reset --hard && git checkout master" &&
+ git checkout -b signed master &&
+ echo foo >foo &&
+ git add foo &&
+ git commit -S -m signed_commit &&
+ git log --graph --show-signature -n1 signed >actual &&
+ grep "^| gpg: Signature made" actual &&
+ grep "^| gpg: Good signature" actual
+'
+
+test_expect_success GPG 'log --graph --show-signature for merged tag' '
+ test_when_finished "git reset --hard && git checkout master" &&
+ git checkout -b plain master &&
+ echo aaa >bar &&
+ git add bar &&
+ git commit -m bar_commit &&
+ git checkout -b tagged master &&
+ echo bbb >baz &&
+ git add baz &&
+ git commit -m baz_commit &&
+ git tag -s -m signed_tag_msg signed_tag &&
+ git checkout plain &&
+ git merge --no-ff -m msg signed_tag &&
+ git log --graph --show-signature -n1 plain >actual &&
+ grep "^|\\\ merged tag" actual &&
+ grep "^| | gpg: Signature made" actual &&
+ grep "^| | gpg: Good signature" actual
+'
+
test_done