@matheusbsbs / matheus-bagliano / commits / 3c29e21eb0
Fork 0

t: drop debug `cat` calls

We `cat` files, but don't inspect or grab the contents in any way. Unlike in an earlier commit, there is no reason to suspect that these files could be missing, so `cat`-ing them is just wasted effort. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Martin Ågren committed Feb 23, 2020 at 09:48 UTC 3c29e21eb047be390d3908d429669cdca3037d9f
11 files changed +2 -13
t/t0021-conversion.sh
-1
@@ -795,7 +795,6 @@ test_expect_success PERL 'missing file in delayed checkout' '
795
796 rm -rf repo-cloned &&
797 test_must_fail git clone repo repo-cloned 2>git-stderr.log &&
798 - cat git-stderr.log &&
798 grep "error: .missing-delay\.a. was not filtered properly" git-stderr.log
799 '
800
t/t1406-submodule-ref-store.sh
+1 -1
@@ -75,7 +75,7 @@ test_expect_success 'for_each_reflog()' '
75 '
76
77 test_expect_success 'for_each_reflog_ent()' '
78 - $RUN for-each-reflog-ent HEAD >actual && cat actual &&
78 + $RUN for-each-reflog-ent HEAD >actual &&
79 head -n1 actual | grep first &&
80 tail -n2 actual | head -n1 | grep master.to.new
81 '
t/t1450-fsck.sh
-1
@@ -141,7 +141,6 @@ test_expect_success 'email without @ is okay' '
141 git update-ref refs/heads/bogus "$new" &&
142 test_when_finished "git update-ref -d refs/heads/bogus" &&
143 git fsck 2>out &&
144 - cat out &&
144 ! grep "commit $new" out
145 '
146
t/t2107-update-index-basic.sh
-1
@@ -9,7 +9,6 @@ Tests for command-line parsing and basic operation.
9
10 test_expect_success 'update-index --nonsense fails' '
11 test_must_fail git update-index --nonsense 2>msg &&
12 - cat msg &&
12 test -s msg
13 '
14
t/t3007-ls-files-recurse-submodules.sh
-1
@@ -130,7 +130,6 @@ test_expect_success '--recurse-submodules and pathspecs setup' '
130
131 git ls-files --recurse-submodules >actual &&
132 test_cmp expect actual &&
133 - cat actual &&
133 git ls-files --recurse-submodules "*" >actual &&
134 test_cmp expect actual
135 '
t/t5150-request-pull.sh
-2
@@ -150,7 +150,6 @@ test_expect_success 'pull request after push' '
150 git request-pull initial origin master:for-upstream >../request
151 ) &&
152 sed -nf read-request.sed <request >digest &&
153 - cat digest &&
153 {
154 read task &&
155 read repository &&
@@ -179,7 +178,6 @@ test_expect_success 'request asks HEAD to be pulled' '
178 git request-pull initial "$downstream_url" >../request
179 ) &&
180 sed -nf read-request.sed <request >digest &&
182 - cat digest &&
181 {
182 read task &&
183 read repository &&
t/t5409-colorize-remote-messages.sh
+1 -2
@@ -56,14 +56,13 @@ test_expect_success 'short line' '
56
57 test_expect_success 'case-insensitive' '
58 git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/case-insensitive 2>output &&
59 - cat output &&
59 test_decode_color <output >decoded &&
60 grep "<BOLD;RED>error<RESET>: error" decoded &&
61 grep "<BOLD;RED>ERROR<RESET>: also highlighted" decoded
62 '
63
64 test_expect_success 'leading space' '
66 - git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/leading-space 2>output && cat output &&
65 + git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/leading-space 2>output &&
66 test_decode_color <output >decoded &&
67 grep " <BOLD;RED>error<RESET>: leading space" decoded
68 '
t/t5510-fetch.sh
-1
@@ -354,7 +354,6 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge
354 # the strange name is: a\!'b
355 test_expect_success 'quoting of a strangely named repo' '
356 test_must_fail git fetch "a\\!'\''b" > result 2>&1 &&
357 - cat result &&
357 grep "fatal: '\''a\\\\!'\''b'\''" result
358 '
359
t/t8003-blame-corner-cases.sh
-1
@@ -173,7 +173,6 @@ test_expect_success 'blame during cherry-pick with file rename conflict' '
173 git show HEAD@{1}:rodent > rodent &&
174 git add rodent &&
175 git blame -f -C -C1 rodent | sed -e "$pick_fc" >current &&
176 - cat current &&
176 cat >expected <<-\EOF &&
177 mouse-Initial
178 mouse-Second
t/t9300-fast-import.sh
-1
@@ -1047,7 +1047,6 @@ test_expect_success 'M: rename root to subdirectory' '
1047 EOF
1048 git fast-import <input &&
1049 git diff-tree -M -r M4^ M4 >actual &&
1050 - cat actual &&
1050 compare_diff_raw expect actual
1051 '
1052
t/t9800-git-p4-basic.sh
-1
@@ -202,7 +202,6 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
202 export PATH &&
203 test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
204 ) &&
205 - cat errs &&
205 test_i18ngrep ! Traceback errs
206 '
207