summaryrefslogtreecommitdiff
path: root/include/git2/submodule.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-05-05 09:22:35 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-22 17:02:55 +0200
commitd6073b30f38f95aa25b1545cccac38261b359de1 (patch)
tree7a5a84001d63bf1574913757a01c50b14ac85aab /include/git2/submodule.h
parent486ba4cdd3d30c202d0c7ed202d6122a7e2b5164 (diff)
downloadlibgit2-d6073b30f38f95aa25b1545cccac38261b359de1.tar.gz
submodule: make `_set_url()` affect the configuration
With this one, we can get rid of the edit_and_save test.
Diffstat (limited to 'include/git2/submodule.h')
-rw-r--r--include/git2/submodule.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 03b9efe96..16895ac3b 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -386,20 +386,18 @@ GIT_EXTERN(const char *) git_submodule_branch(git_submodule *submodule);
GIT_EXTERN(int) git_submodule_set_branch(git_repository *repo, const char *name, const char *branch);
/**
- * Set the URL for the submodule.
+ * Set the URL for the submodule in the configuration
*
- * This sets the URL in memory for the submodule. This will be used for
- * any following submodule actions while this submodule data is in memory.
*
- * After calling this, you may wish to call `git_submodule_save()` to write
- * the changes back to the ".gitmodules" file and `git_submodule_sync()` to
+ * After calling this, you may wish to call `git_submodule_sync()` to
* write the changes to the checked out submodule repository.
*
- * @param submodule Pointer to the submodule object
+ * @param repo the repository to affect
+ * @param name the name of the submodule to configure
* @param url URL that should be used for the submodule
* @return 0 on success, <0 on failure
*/
-GIT_EXTERN(int) git_submodule_set_url(git_submodule *submodule, const char *url);
+GIT_EXTERN(int) git_submodule_set_url(git_repository *repo, const char *name, const char *url);
/**
* Get the OID for the submodule in the index.