test.sh: avoid redundant calls to `git show'