My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
038212c
)
t0021: compute file size with a single process instead of a pipeline
author
Johannes Sixt
<j6t@kdbg.org>
Sun, 6 Nov 2016 19:31:19 +0000
(20:31 +0100)
committer
Jeff King
<peff@peff.net>
Tue, 8 Nov 2016 20:26:40 +0000
(15:26 -0500)
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>
t/t0021-conversion.sh
patch
|
blob
|
history
diff --git
a/t/t0021-conversion.sh
b/t/t0021-conversion.sh
index
db71aca
..
cb72fa4
100755
(executable)
--- 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 () {