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-04 17:22:56 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-22 18:02:55 +0300
commit5a9fc6c83c2fd12ce312d1042ec2c1e6abad4033 (patch)
tree80f41e0481654c349adb9762d377d2599869bcb6 /include
parentdfda2f68ea9602a6b0d08e36bd48e6a4899b12ff (diff)
submodule: make set_ignore() affect the configuration
Instead of affecting a particular instance, make it change the configuration.
Diffstat (limited to 'include')
-rw-r--r--include/git2/submodule.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 48faf8a49..e41dc49d2 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -452,9 +452,6 @@ GIT_EXTERN(const git_oid *) git_submodule_wd_id(git_submodule *submodule);
* The working directory will be consider clean so long as there is a
* checked out version present.
*
- * plus the special **GIT_SUBMODULE_IGNORE_RESET** which can be used with
- * `git_submodule_set_ignore()` to revert to the on-disk setting.
- *
* @param submodule The submodule to check
* @return The current git_submodule_ignore_t valyue what will be used for
* this submodule.
@@ -463,23 +460,18 @@ GIT_EXTERN(git_submodule_ignore_t) git_submodule_ignore(
git_submodule *submodule);
/**
- * Set the ignore rule for the submodule.
- *
- * This sets the in-memory ignore rule for the submodule which will
- * control the behavior of `git_submodule_status()`.
+ * Set the ignore rule for the submodule in the configuration
*
- * To make changes persistent, call `git_submodule_save()` to write the
- * value to disk (in the ".gitmodules" and ".git/config" files).
+ * This does not affect any currently-loaded instances.
*
- * Call with `GIT_SUBMODULE_IGNORE_RESET` or call `git_submodule_reload()`
- * to revert the in-memory rule to the value that is on disk.
- *
- * @param submodule The submodule to update
+ * @param repo the repository to affect
+ * @param name the name of the submdule
* @param ignore The new value for the ignore rule
- * @return old value for ignore
+ * @return 0 or an error code
*/
-GIT_EXTERN(git_submodule_ignore_t) git_submodule_set_ignore(
- git_submodule *submodule,
+GIT_EXTERN(int) git_submodule_set_ignore(
+ git_repository *repo,
+ const char *name,
git_submodule_ignore_t ignore);
/**