Don't use truncate in gitserver tests
Created by: flying-robot
@unknwon pointed out that truncate
is not guaranteed to be available (e.g macOS), so this swaps that out for a builtin redirection that will accomplish the same thing:
$ echo 'hello' > hello.txt
$ cat hello.txt
hello
$ : > hello.txt
$ cat hello.txt
ref https://github.com/sourcegraph/sourcegraph/pull/14962#discussion_r510291290