path: convert do_git_path to take a 'struct repository'