From b914e17d8268f836bcd8b785781ed24cbec1c29f Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Wed, 12 Dec 2012 12:23:24 -0800 Subject: API to set a dangling remote's repository --- include/git2/remote.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/git2/remote.h') diff --git a/include/git2/remote.h b/include/git2/remote.h index 153bd1e42..6649b3a46 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -51,6 +51,16 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi */ GIT_EXTERN(int) git_remote_new(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch); +/** + * Sets the owning repository for the remote. This is only allowed on + * dangling remotes. + * + * @param remote the remote to configure + * @param repo the repository that will own the remote + * @return 0 or an error code + */ +GIT_EXTERN(int) git_remote_set_repository(git_remote *remote, git_repository *repo); + /** * Get the information for a particular remote * -- cgit v1.2.1