I was able to fix this by adding a sed command to remove leading spaces:
- "($(git ls-files|wc -l) entries, 0 subtrees)" >expect &&
+ "($(git ls-files|wc -l|sed -e 's/^ *//') entries, 0 subtrees)" >expect &&
But I'm not sure if this is the best way to solve the issue.
Well, tr -d ' ' saves all of 7 characters from sed -e 's/^ *//'.
--
Hallvard