cache: remove unused function 'have_git_dir'