diff options
author | Johannes Sixt <j6t@kdbg.org> | 2016-11-06 22:31:19 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2016-11-08 23:26:40 +0300 |
commit | ec2e8b3da21c884325c9764abc62251fcfbe6208 (patch) | |
tree | 622fa9d5adecb81ee819df74ddb8cbde97adeca0 /t | |
parent | 038212c4c40c4cd9eb518fb1fbb5eb0d0d7d8f67 (diff) |
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0021-conversion.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index db71acacb3..cb72fa49de 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -22,7 +22,7 @@ generate_random_characters () { } file_size () { - cat "$1" | wc -c | sed "s/^[ ]*//" + perl -e 'print -s $ARGV[0]' "$1" } filter_git () { |