mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'bw/maint-0090-awk-tweak'
* bw/maint-0090-awk-tweak: t0090: tweak awk statement for Solaris /usr/xpg4/bin/awk
This commit is contained in:
commit
40d2f38635
|
@ -22,7 +22,7 @@ generate_expected_cache_tree_rec () {
|
|||
# ls-files might have foo/bar, foo/bar/baz, and foo/bar/quux
|
||||
# We want to count only foo because it's the only direct child
|
||||
subtrees=$(git ls-files|grep /|cut -d / -f 1|uniq) &&
|
||||
subtree_count=$(echo "$subtrees"|awk -v c=0 '$1 {++c} END {print c}') &&
|
||||
subtree_count=$(echo "$subtrees"|awk -v c=0 '$1 != "" {++c} END {print c}') &&
|
||||
entries=$(git ls-files|wc -l) &&
|
||||
printf "SHA $dir (%d entries, %d subtrees)\n" "$entries" "$subtree_count" &&
|
||||
for subtree in $subtrees
|
||||
|
|
Loading…
Reference in a new issue