From: Denton Liu Date: Thu, 26 Mar 2020 08:27:51 +0000 (-0400) Subject: t5550: simplify no matching line check X-Git-Tag: v2.27.0-rc0~134^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a828bcf1e1a3152f31c90bcf6557ba8d7b0459f;p=thirdparty%2Fgit.git t5550: simplify no matching line check In the 'did not use upload-pack service' test, we have a complicated song-and-dance to ensure that there are no "/git-upload-pack" lines in "$HTTPD_ROOT_PATH/access.log". Simplify this by just checking that grep returns a non-zero exit code. Helped-by: Junio C Hamano Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh index b811d89cfd..bcde886b87 100755 --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@ -248,9 +248,7 @@ test_expect_success 'fetch can handle previously-fetched .idx files' ' ' test_expect_success 'did not use upload-pack service' ' - test_might_fail grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act && - : >exp && - test_cmp exp act + ! grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log" ' test_expect_success 'git client shows text/plain errors' '