diff options
author | Russell Belfer <rb@github.com> | 2012-09-07 15:49:08 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-09-07 15:49:08 -0700 |
commit | 17b06f4d47bfd9fae8073c85d71751df94e50050 (patch) | |
tree | de5fe2806ac9b5e89f6f01e237b1433cc7bf6ee4 /include/git2/submodule.h | |
parent | 0e9f2fcef6955a9c15f216ad78eec538cc97a8f3 (diff) | |
download | libgit2-development.tar.gz |
Add missing accessor for fetchRecurseSubmodulesdevelopment
When `git_submodule` became an opaque structure, I forgot to add
accessor functions for the fetchRecurseSubmodules config setting.
This fixes that.
Diffstat (limited to 'include/git2/submodule.h')
-rw-r--r-- | include/git2/submodule.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index fe7f26cf..28057d26 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -396,6 +396,35 @@ GIT_EXTERN(git_submodule_update_t) git_submodule_set_update( git_submodule_update_t update); /** + * Read the fetchRecurseSubmodules rule for a submodule. + * + * This accesses the submodule.<name>.fetchRecurseSubmodules value for + * the submodule that controls fetching behavior for the submodule. + * + * Note that at this time, libgit2 does not honor this setting and the + * fetch functionality current ignores submodules. + * + * @return 0 if fetchRecurseSubmodules is false, 1 if true + */ +GIT_EXTERN(int) git_submodule_fetch_recurse_submodules( + git_submodule *submodule); + +/** + * Set the fetchRecurseSubmodules rule for a submodule. + * + * This sets the submodule.<name>.fetchRecurseSubmodules value for + * the submodule. You should call `git_submodule_save()` if you want + * to persist the new value. + * + * @param submodule The submodule to modify + * @param fetch_recurse_submodules Boolean value + * @return old value for fetchRecurseSubmodules + */ +GIT_EXTERN(int) git_submodule_set_fetch_recurse_submodules( + git_submodule *submodule, + int fetch_recurse_submodules); + +/** * Copy submodule info into ".git/config" file. * * Just like "git submodule init", this copies information about the |