From ae35aa07082968e00b9b77173c622482ea02db5d Mon Sep 17 00:00:00 2001 From: nulltoken Date: Mon, 24 Dec 2012 15:29:26 +0100 Subject: [PATCH] remote: Improve documentation --- include/git2/remote.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/git2/remote.h b/include/git2/remote.h index 4397154e9..0be30cd02 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -41,7 +41,7 @@ typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, voi * @param repo the repository in which to create the remote * @param name the remote's name * @param url the remote's url - * @return 0 or an error code + * @return 0, GIT_EINVALIDSPEC or an error code */ GIT_EXTERN(int) git_remote_create( git_remote **out, @@ -63,7 +63,7 @@ GIT_EXTERN(int) git_remote_create( * @param repo the associated repository. May be NULL for a "dangling" remote. * @param url the remote repository's URL * @param fetch the fetch refspec to use for this remote. May be NULL for defaults. - * @return 0, GIT_EINVALIDSPEC or an error code + * @return 0 or an error code */ GIT_EXTERN(int) git_remote_create_inmemory( git_remote **out, @@ -97,7 +97,7 @@ GIT_EXTERN(int) git_remote_load(git_remote **out, git_repository *repo, const ch /** * Save a remote to its repository's configuration * - * One can't save a nameless inmemory remote. Doing so will + * One can't save a in-memory remote. Doing so will * result in a GIT_EINVALIDSPEC being returned. * * @param remote the remote to save to config @@ -428,12 +428,14 @@ GIT_EXTERN(void) git_remote_set_autotag( * The new name will be checked for validity. * See `git_tag_create()` for rules about valid names. * + * A temporary in-memory remote cannot be given a name with this method. + * * @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 * that haven't been automatically updated and need potential manual tweaking. * @param payload Additional data to pass to the callback - * @return 0, GIT_EINVALIDSPEC or an error code + * @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code */ GIT_EXTERN(int) git_remote_rename( git_remote *remote,