avoid git ls-files when possible