summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-09-30 16:07:30 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-30 16:09:55 +0200
commit262eec23fe7377a9eecf9e724fa1aba945b3162a (patch)
tree93487fe48d9a51c2ceb993cb7dc6821ca0407a70 /include
parenta2a23322193eeca5d2912c0b74c5374f8ec21737 (diff)
downloadlibgit2-cmn/remote-delete-name.tar.gz
remote: accept a repository and remote name for deletioncmn/remote-delete-name
We don't need the remote loaded, and the function extracted both of these from the git_remote in order to do its work, so let's remote a step and not ask for the loaded remote at all. This fixes #2390.
Diffstat (limited to 'include')
-rw-r--r--include/git2/remote.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 055f5e517..6c3eb391b 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -596,10 +596,11 @@ GIT_EXTERN(int) git_remote_is_valid_name(const char *remote_name);
* All remote-tracking branches and configuration settings
* for the remote will be removed.
*
-* @param remote A valid remote
+* @param repo the repository in which to act
+* @param name the name of the remove to delete
* @return 0 on success, or an error code.
*/
-GIT_EXTERN(int) git_remote_delete(git_remote *remote);
+GIT_EXTERN(int) git_remote_delete(git_repository *repo, const char *name);
/**
* Retrieve the name of the remote's default branch