Sending the entire log to /dev/null is a rather expensive way of checking whether we are inside a git working tree. Use `git rev-parse --is-inside-work-tree` instead. (cherry picked from commit 1e3f932932)
1e3f932932