replace xstrdup(git_path(...)) with git_pathdup(...)