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.