setup.c: convert is_git_directory() to use strbuf