The second test of 't5541-http-push-smart.sh', 'no empty path components' truncates Apache's access log by running echo >.../access.log which doesn't leave an empty file behind, like a proper truncation would, but a file with a lone newline in it. Consequently, a later test checking the log's contents must consider this improper truncation and include an empty line in the expected content. There is no need for that newline at all, so drop the 'echo' from the truncation and adjust the expected content accordingly. Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx> --- t/t5541-http-push-smart.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 21340e89c9..c961db814d 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -54,7 +54,7 @@ test_expect_success 'no empty path components' ' # service" test which reads the log too. # # We do this before the actual comparison to ensure the log is cleared. - echo > "$HTTPD_ROOT_PATH"/access.log && + >"$HTTPD_ROOT_PATH"/access.log && test_cmp exp act ' @@ -124,7 +124,6 @@ test_expect_success 'rejected update prints status' ' rm -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/hooks/update" cat >exp <<EOF - GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200 POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200 GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200 -- 2.18.0.rc0.207.ga6211da864