t0021: compute file size with a single process instead of a pipeline

Avoid unwanted coding patterns (prodigal use of pipelines), and in
particular a useless use of cat.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
Johannes Sixt 2016-11-06 20:31:19 +01:00 committed by Jeff King
parent 038212c4c4
commit ec2e8b3da2

View File

@ -22,7 +22,7 @@ generate_random_characters () {
}
file_size () {
cat "$1" | wc -c | sed "s/^[ ]*//"
perl -e 'print -s $ARGV[0]' "$1"
}
filter_git () {