summaryrefslogtreecommitdiff
path: root/include/git2/submodule.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-05-04 17:29:12 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-22 17:02:55 +0200
commitc6f489c964bc4df29bdacb1ee4afdcdb294f3815 (patch)
tree2311b70fa744c2552208d4d05ff76176d0827a17 /include/git2/submodule.h
parent64bbd47a32e6aaed539bafd109eef624f24fbae7 (diff)
downloadlibgit2-c6f489c964bc4df29bdacb1ee4afdcdb294f3815.tar.gz
submodule: add an ignore option to status
This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
Diffstat (limited to 'include/git2/submodule.h')
-rw-r--r--include/git2/submodule.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 737570844..31218cc94 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -631,12 +631,14 @@ GIT_EXTERN(int) git_submodule_reload_all(git_repository *repo, int force);
* @param status Combination of `GIT_SUBMODULE_STATUS` flags
* @param repo the repository in which to look
* @param name name of the submodule
+ * @param ignore the ignore rules to follow
* @return 0 on success, <0 on error
*/
GIT_EXTERN(int) git_submodule_status(
unsigned int *status,
git_repository *repo,
- const char *name);
+ const char *name,
+ git_submodule_ignore_t ignore);
/**
* Get the locations of submodule information.