Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-05-05 09:35:29 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-22 18:02:55 +0300
commite8a39f8ed1a95b96415c719c826f0e5715432393 (patch)
tree28f377d8f3228182901079e1ce550d148fea96b6 /include
parent2278637c4a77df29231b8b7841ba21630ae6c4a3 (diff)
submodule: make `_set_update()` affect the configuration
Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
Diffstat (limited to 'include')
-rw-r--r--include/git2/submodule.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 31218cc94..d36884a3c 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -490,23 +490,18 @@ GIT_EXTERN(git_submodule_update_t) git_submodule_update_strategy(
git_submodule *submodule);
/**
- * Set the update rule for the submodule.
+ * Set the update rule for the submodule in the configuration
*
- * The initial value comes from the ".git/config" setting of
- * `submodule.$name.update` for this submodule (which is initialized from
- * the ".gitmodules" file). Using this function sets the update rule in
- * memory for the submodule. Call `git_submodule_save()` to write out the
- * new update rule.
+ * This setting won't affect any existing instances.
*
- * Calling this again with GIT_SUBMODULE_UPDATE_RESET or calling
- * `git_submodule_reload()` will revert the rule to the on disk value.
- *
- * @param submodule The submodule to update
+ * @param repo the repository to affect
+ * @param name the name of the submodule to configure
* @param update The new value to use
- * @return old value for update
+ * @return 0 or an error code
*/
-GIT_EXTERN(git_submodule_update_t) git_submodule_set_update(
- git_submodule *submodule,
+GIT_EXTERN(int) git_submodule_set_update(
+ git_repository *repo,
+ const char *name,
git_submodule_update_t update);
/**