t: assume test_cmp produces verbose output

Some tests call test_cmp, and if it fails show the actual output generated. This is mostly pointless, as test_cmp will already show a diff between the expected and actual output. It also fools --chain-lint by putting an "||" in the middle of the chain, so we'd rather not use this construct. Note that these cases actually show a pre-processed version of the data, rather than exactly what test_cmp would show. However, test_cmp's output is generally good for pointing the user in the right direction, and they can then dig in the trash directory themselves if they want to see more details. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Mar 20, 2015 at 06:07 UTC 5ca812a19c97a2cbfe797748bc9bf6ebde9e0f64
2 files changed +3 -12
t/t6012-rev-list-simplify.sh
+2 -8
@@ -95,10 +95,7 @@ check_outcome () {
95 git log --pretty="$FMT" --parents $param |
96 unnote >actual &&
97 sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
98 - test_cmp expect check || {
99 - cat actual
100 - false
101 - }
98 + test_cmp expect check
99 '
100 }
101
@@ -121,10 +118,7 @@ test_expect_success 'full history simplification without parent' '
118 git log --pretty="$FMT" --full-history E -- lost |
119 unnote >actual &&
120 sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
124 - test_cmp expect check || {
125 - cat actual
126 - false
127 - }
121 + test_cmp expect check
122 '
123
124 test_expect_success '--full-diff is not affected by --parents' '
t/t6111-rev-list-treesame.sh
+1 -4
@@ -92,10 +92,7 @@ check_outcome () {
92 git log --format="$FMT" $param |
93 unnote >actual &&
94 sed -e "$munge_actual" <actual >check &&
95 - test_cmp expect check || {
96 - cat actual
97 - false
98 - }
95 + test_cmp expect check
96 '
97 }
98