Imported Upstream version 2.22.3
[platform/upstream/git.git] / t / t7007-show.sh
index e41fa00..42d3db6 100755 (executable)
@@ -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' '
@@ -109,8 +110,11 @@ test_expect_success 'showing range' '
 '
 
 test_expect_success '-s suppresses diff' '
-       echo main3 >expect &&
-       git show -s --format=%s main3 >actual &&
+       cat >expect <<-\EOF &&
+       merge
+       main3
+       EOF
+       git show -s --format=%s merge main3 >actual &&
        test_cmp expect actual
 '
 
@@ -120,4 +124,8 @@ test_expect_success '--quiet suppresses diff' '
        test_cmp expect actual
 '
 
+test_expect_success 'show --graph is forbidden' '
+  test_must_fail git show --graph HEAD
+'
+
 test_done