Browse Source

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>
maint
Johannes Sixt 8 years ago committed by Jeff King
parent
commit
ec2e8b3da2
  1. 2
      t/t0021-conversion.sh

2
t/t0021-conversion.sh

@ -22,7 +22,7 @@ generate_random_characters () { @@ -22,7 +22,7 @@ generate_random_characters () {
}

file_size () {
cat "$1" | wc -c | sed "s/^[ ]*//"
perl -e 'print -s $ARGV[0]' "$1"
}

filter_git () {

Loading…
Cancel
Save