The second test of '', '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 <>
 t/ | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/t/ b/t/
index a2af693068..d623cbad97 100755
--- a/t/
+++ b/t/
@@ -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

Reply via email to