diff options
Diffstat (limited to 't/t7007-show.sh')
-rwxr-xr-x | t/t7007-show.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/t/t7007-show.sh b/t/t7007-show.sh index a40cd3630c..42d3db6246 100755 --- a/t/t7007-show.sh +++ b/t/t7007-show.sh @@ -24,7 +24,8 @@ test_expect_success 'set up a bit of history' ' git tag -m "annotated tag" annotated && git checkout -b side HEAD^^ && test_commit side2 && - test_commit side3 + test_commit side3 && + test_merge merge main3 ' test_expect_success 'showing two commits' ' @@ -108,4 +109,23 @@ test_expect_success 'showing range' ' test_cmp expect actual.filtered ' +test_expect_success '-s suppresses diff' ' + cat >expect <<-\EOF && + merge + main3 + EOF + git show -s --format=%s merge main3 >actual && + test_cmp expect actual +' + +test_expect_success '--quiet suppresses diff' ' + echo main3 >expect && + git show --quiet --format=%s main3 >actual && + test_cmp expect actual +' + +test_expect_success 'show --graph is forbidden' ' + test_must_fail git show --graph HEAD +' + test_done |