]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ma/test-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Mon, 2 Mar 2020 23:07:20 +0000 (15:07 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Mar 2020 23:07:20 +0000 (15:07 -0800)
Code cleanup.

* ma/test-cleanup:
  t: drop debug `cat` calls
  t9810: drop debug `cat` call
  t4117: check for files using `test_path_is_file`

13 files changed:
t/t0021-conversion.sh
t/t1406-submodule-ref-store.sh
t/t1450-fsck.sh
t/t2107-update-index-basic.sh
t/t3007-ls-files-recurse-submodules.sh
t/t4117-apply-reject.sh
t/t5150-request-pull.sh
t/t5409-colorize-remote-messages.sh
t/t5510-fetch.sh
t/t8003-blame-corner-cases.sh
t/t9300-fast-import.sh
t/t9800-git-p4-basic.sh
t/t9810-git-p4-rcs.sh

index 6c6d77b51aaacaf90f08ca9f528c244c16e014a1..dc664da551a3e9711df96f7291df4a1c8070d4d7 100755 (executable)
@@ -795,7 +795,6 @@ test_expect_success PERL 'missing file in delayed checkout' '
 
        rm -rf repo-cloned &&
        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
 '
 
index d199d872fb1996922a0a77058955c105aef4377c..36b7ef504687f52e50fd4fef1500bc487c6f286d 100755 (executable)
@@ -75,7 +75,7 @@ test_expect_success 'for_each_reflog()' '
 '
 
 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 &&
        tail -n2 actual | head -n1 | grep master.to.new
 '
index 02478bc4ece20564a7d5ea27df91cb0695d6e5ec..d09eff503c65aa4f9b6e95f6c1d163f0936e89f9 100755 (executable)
@@ -141,7 +141,6 @@ test_expect_success 'email without @ is okay' '
        git update-ref refs/heads/bogus "$new" &&
        test_when_finished "git update-ref -d refs/heads/bogus" &&
        git fsck 2>out &&
-       cat out &&
        ! grep "commit $new" out
 '
 
index 2242cd098ec4ee0b278c008220d8c2a678b174c7..a30b7ca6bc90c94c5b948b6040e890bc0e569c6f 100755 (executable)
@@ -9,7 +9,6 @@ Tests for command-line parsing and basic operation.
 
 test_expect_success 'update-index --nonsense fails' '
        test_must_fail git update-index --nonsense 2>msg &&
-       cat msg &&
        test -s msg
 '
 
index 318b5bce7ebeab2ad96097e992e37867b3a7adb5..4a080007137926b5dcc84ee80856bcbcfc71340f 100755 (executable)
@@ -130,7 +130,6 @@ test_expect_success '--recurse-submodules and pathspecs setup' '
 
        git ls-files --recurse-submodules >actual &&
        test_cmp expect actual &&
-       cat actual &&
        git ls-files --recurse-submodules "*" >actual &&
        test_cmp expect actual
 '
index f7de6f077a6e055b79dfc2ae572f1552c40d2eb3..0ee93fe845afec2aebb50819d3301c3c1972b34c 100755 (executable)
@@ -74,7 +74,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
        test_must_fail git apply --reject patch.1 &&
        test_cmp expected file1 &&
 
-       cat file1.rej &&
+       test_path_is_file file1.rej &&
        test_path_is_missing file2.rej
 '
 
@@ -87,7 +87,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
        test_path_is_missing file1 &&
        test_cmp expected file2 &&
 
-       cat file2.rej &&
+       test_path_is_file file2.rej &&
        test_path_is_missing file1.rej
 
 '
@@ -101,7 +101,7 @@ test_expect_success 'the same test with --verbose' '
        test_path_is_missing file1 &&
        test_cmp expected file2 &&
 
-       cat file2.rej &&
+       test_path_is_file file2.rej &&
        test_path_is_missing file1.rej
 
 '
index 1ad4ecc29a72b6a3e4a7d960865647447a0618d6..c1811ea0f4129447070a7650a0dd95a5b4ef9f46 100755 (executable)
@@ -150,7 +150,6 @@ test_expect_success 'pull request after push' '
                git request-pull initial origin master:for-upstream >../request
        ) &&
        sed -nf read-request.sed <request >digest &&
-       cat digest &&
        {
                read task &&
                read repository &&
@@ -179,7 +178,6 @@ test_expect_success 'request asks HEAD to be pulled' '
                git request-pull initial "$downstream_url" >../request
        ) &&
        sed -nf read-request.sed <request >digest &&
-       cat digest &&
        {
                read task &&
                read repository &&
index 2a8c4496618523ebdbd03eb152a1e8189fafcd0a..5d8f401d8ece8cc76e8c46591ed4883337e57a5f 100755 (executable)
@@ -56,14 +56,13 @@ test_expect_success 'short line' '
 
 test_expect_success 'case-insensitive' '
        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 &&
        grep "<BOLD;RED>error<RESET>: error" decoded &&
        grep "<BOLD;RED>ERROR<RESET>: also highlighted" decoded
 '
 
 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 &&
        grep "  <BOLD;RED>error<RESET>: leading space" decoded
 '
index 566994cede3ef22c0c3927779a53d3923e3d6694..a66dbe0bde0df2851c3736d193707ec7c36bd429 100755 (executable)
@@ -379,7 +379,6 @@ test_expect_success 'fetch from GIT URL with a non-applying branch.<name>.merge
 # the strange name is: a\!'b
 test_expect_success 'quoting of a strangely named repo' '
        test_must_fail git fetch "a\\!'\''b" > result 2>&1 &&
-       cat result &&
        grep "fatal: '\''a\\\\!'\''b'\''" result
 '
 
index 1c5fb1d1f8c9cd9062ae44c6069fc530259762d4..9130b887d2cc45db769e1e5cbb0ddb1c32cf4b39 100755 (executable)
@@ -173,7 +173,6 @@ test_expect_success 'blame during cherry-pick with file rename conflict' '
        git show HEAD@{1}:rodent > rodent &&
        git add rodent &&
        git blame -f -C -C1 rodent | sed -e "$pick_fc" >current &&
-       cat current &&
        cat >expected <<-\EOF &&
        mouse-Initial
        mouse-Second
index ae9950a9c20ac48dab9d6c91ef6bd4e2aa372fc7..3e41c58a13689b65bf5a9ed6b2fc6466b303af81 100755 (executable)
@@ -1047,7 +1047,6 @@ test_expect_success 'M: rename root to subdirectory' '
        EOF
        git fast-import <input &&
        git diff-tree -M -r M4^ M4 >actual &&
-       cat actual &&
        compare_diff_raw expect actual
 '
 
index 5856563068c71280065c28d294a7c0a1149f6008..c98c1dfc2308e0affc48d5c2e133b6e5d24e9283 100755 (executable)
@@ -202,7 +202,6 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
                export PATH &&
                test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
        ) &&
-       cat errs &&
        test_i18ngrep ! Traceback errs
 '
 
index 57b533dc6fbaa9d9b82bdaf300b46a426c7b43b7..e3836888ec8b322cf1032d9a1804fec915c10b11 100755 (executable)
@@ -294,7 +294,6 @@ test_expect_success 'cope with rcs keyword file deletion' '
                echo "\$Revision\$" >kwdelfile.c &&
                p4 add -t ktext kwdelfile.c &&
                p4 submit -d "Add file to be deleted" &&
-               cat kwdelfile.c &&
                grep 1 kwdelfile.c
        ) &&
        git p4 clone --dest="$git" //depot &&