From 40ef47dd46fdd361b49ccc97605a93e0993e96db Mon Sep 17 00:00:00 2001 From: Arthur Schreiber Date: Tue, 14 Jan 2014 21:03:01 +0100 Subject: Add `git_remote_dup`. --- include/git2/remote.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/git2/remote.h') diff --git a/include/git2/remote.h b/include/git2/remote.h index 7410909dc..d3e6caa48 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -107,6 +107,18 @@ GIT_EXTERN(int) git_remote_load(git_remote **out, git_repository *repo, const ch */ GIT_EXTERN(int) git_remote_save(const git_remote *remote); +/** + * Create a copy of an existing remote. All internal strings are also + * duplicated. Callbacks are not duplicated. + * + * Call `git_remote_free` to free the data. + * + * @param dest pointer where to store the copy + * @param source object to copy + * @return 0 or an error code + */ +GIT_EXTERN(int) git_remote_dup(git_remote **dest, const git_remote *source); + /** * Get the remote's repository * -- cgit v1.2.1