Do not call git_pathdup if we have no repository