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>
maint
Martin Ågren 2020-02-23 09:48:36 +01:00 committed by Junio C Hamano
parent cac439b56d
commit 3c29e21eb0
11 changed files with 2 additions and 13 deletions

View File

@ -795,7 +795,6 @@ test_expect_success PERL 'missing file in delayed checkout' '


rm -rf repo-cloned && rm -rf repo-cloned &&
test_must_fail git clone repo repo-cloned 2>git-stderr.log && test_must_fail git clone repo repo-cloned 2>git-stderr.log &&
cat git-stderr.log &&
grep "error: .missing-delay\.a. was not filtered properly" git-stderr.log grep "error: .missing-delay\.a. was not filtered properly" git-stderr.log
' '



View File

@ -75,7 +75,7 @@ test_expect_success 'for_each_reflog()' '
' '


test_expect_success 'for_each_reflog_ent()' ' test_expect_success 'for_each_reflog_ent()' '
$RUN for-each-reflog-ent HEAD >actual && cat actual && $RUN for-each-reflog-ent HEAD >actual &&
head -n1 actual | grep first && head -n1 actual | grep first &&
tail -n2 actual | head -n1 | grep master.to.new tail -n2 actual | head -n1 | grep master.to.new
' '

View File

@ -141,7 +141,6 @@ test_expect_success 'email without @ is okay' '
git update-ref refs/heads/bogus "$new" && git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" && test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out && git fsck 2>out &&
cat out &&
! grep "commit $new" out ! grep "commit $new" out
' '



View File

@ -9,7 +9,6 @@ Tests for command-line parsing and basic operation.


test_expect_success 'update-index --nonsense fails' ' test_expect_success 'update-index --nonsense fails' '
test_must_fail git update-index --nonsense 2>msg && test_must_fail git update-index --nonsense 2>msg &&
cat msg &&
test -s msg test -s msg
' '



View File

@ -130,7 +130,6 @@ test_expect_success '--recurse-submodules and pathspecs setup' '


git ls-files --recurse-submodules >actual && git ls-files --recurse-submodules >actual &&
test_cmp expect actual && test_cmp expect actual &&
cat actual &&
git ls-files --recurse-submodules "*" >actual && git ls-files --recurse-submodules "*" >actual &&
test_cmp expect actual test_cmp expect actual
' '

View File

@ -150,7 +150,6 @@ test_expect_success 'pull request after push' '
git request-pull initial origin master:for-upstream >../request git request-pull initial origin master:for-upstream >../request
) && ) &&
sed -nf read-request.sed <request >digest && sed -nf read-request.sed <request >digest &&
cat digest &&
{ {
read task && read task &&
read repository && read repository &&
@ -179,7 +178,6 @@ test_expect_success 'request asks HEAD to be pulled' '
git request-pull initial "$downstream_url" >../request git request-pull initial "$downstream_url" >../request
) && ) &&
sed -nf read-request.sed <request >digest && sed -nf read-request.sed <request >digest &&
cat digest &&
{ {
read task && read task &&
read repository && read repository &&

View File

@ -56,14 +56,13 @@ test_expect_success 'short line' '


test_expect_success 'case-insensitive' ' test_expect_success 'case-insensitive' '
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/case-insensitive 2>output && git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/case-insensitive 2>output &&
cat output &&
test_decode_color <output >decoded && test_decode_color <output >decoded &&
grep "<BOLD;RED>error<RESET>: error" decoded && grep "<BOLD;RED>error<RESET>: error" decoded &&
grep "<BOLD;RED>ERROR<RESET>: also highlighted" decoded grep "<BOLD;RED>ERROR<RESET>: also highlighted" decoded
' '


test_expect_success 'leading space' ' test_expect_success 'leading space' '
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/leading-space 2>output && cat output && git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/leading-space 2>output &&
test_decode_color <output >decoded && test_decode_color <output >decoded &&
grep " <BOLD;RED>error<RESET>: leading space" decoded grep " <BOLD;RED>error<RESET>: leading space" decoded
' '

View File

@ -354,7 +354,6 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge
# the strange name is: a\!'b # the strange name is: a\!'b
test_expect_success 'quoting of a strangely named repo' ' test_expect_success 'quoting of a strangely named repo' '
test_must_fail git fetch "a\\!'\''b" > result 2>&1 && test_must_fail git fetch "a\\!'\''b" > result 2>&1 &&
cat result &&
grep "fatal: '\''a\\\\!'\''b'\''" result grep "fatal: '\''a\\\\!'\''b'\''" result
' '



View File

@ -173,7 +173,6 @@ test_expect_success 'blame during cherry-pick with file rename conflict' '
git show HEAD@{1}:rodent > rodent && git show HEAD@{1}:rodent > rodent &&
git add rodent && git add rodent &&
git blame -f -C -C1 rodent | sed -e "$pick_fc" >current && git blame -f -C -C1 rodent | sed -e "$pick_fc" >current &&
cat current &&
cat >expected <<-\EOF && cat >expected <<-\EOF &&
mouse-Initial mouse-Initial
mouse-Second mouse-Second

View File

@ -1047,7 +1047,6 @@ test_expect_success 'M: rename root to subdirectory' '
EOF EOF
git fast-import <input && git fast-import <input &&
git diff-tree -M -r M4^ M4 >actual && git diff-tree -M -r M4^ M4 >actual &&
cat actual &&
compare_diff_raw expect actual compare_diff_raw expect actual
' '



View File

@ -202,7 +202,6 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
export PATH && export PATH &&
test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1 test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
) && ) &&
cat errs &&
test_i18ngrep ! Traceback errs test_i18ngrep ! Traceback errs
' '