We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 792a572 + c8db708 commit e2ebb5cCopy full SHA for e2ebb5c
t/t0090-cache-tree.sh
@@ -22,7 +22,7 @@ generate_expected_cache_tree_rec () {
22
# ls-files might have foo/bar, foo/bar/baz, and foo/bar/quux
23
# We want to count only foo because it's the only direct child
24
subtrees=$(git ls-files|grep /|cut -d / -f 1|uniq) &&
25
- subtree_count=$(echo "$subtrees"|awk '$1 {++c} END {print c}') &&
+ subtree_count=$(echo "$subtrees"|awk -v c=0 '$1 {++c} END {print c}') &&
26
entries=$(git ls-files|wc -l) &&
27
printf "SHA $dir (%d entries, %d subtrees)\n" "$entries" "$subtree_count" &&
28
for subtree in $subtrees
0 commit comments