summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-06-06 16:33:54 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-06-06 21:43:04 +0200
commit72bca13e5d0d421da7992f029e275d950c864105 (patch)
tree4ddc73e8770e136cc2e4d28bfbf472cedcb2cf1f /include
parent61dcfe1400a5ff1cf4dc805795cb72657c524906 (diff)
downloadlibgit2-72bca13e5d0d421da7992f029e275d950c864105.tar.gz
remote: return problem refspecs instead of using a callback
There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Diffstat (limited to 'include')
-rw-r--r--include/git2/remote.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 28771ac42..8d3744265 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -572,6 +572,9 @@ GIT_EXTERN(void) git_remote_set_autotag(
*
* A temporary in-memory remote cannot be given a name with this method.
*
+ * @param problems non-default refspecs cannot be renamed and will be
+ * stored here for further processing by the caller. Always free this
+ * strarray on succesful return.
* @param remote the remote to rename
* @param new_name the new name the remote should bear
* @param callback Optional callback to notify the consumer of fetch refspecs
@@ -580,10 +583,9 @@ GIT_EXTERN(void) git_remote_set_autotag(
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
*/
GIT_EXTERN(int) git_remote_rename(
+ git_strarray *problems,
git_remote *remote,
- const char *new_name,
- git_remote_rename_problem_cb callback,
- void *payload);
+ const char *new_name);
/**
* Retrieve the update FETCH_HEAD setting.