diff options
| author | Russell Belfer <rb@github.com> | 2014-01-28 11:45:06 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2014-01-30 09:59:59 -0800 |
| commit | c0644c3fbb31c381afb2d0658b5c6e83432fd8c9 (patch) | |
| tree | 420faf1e93d3191e9aae9e94915da2cd998c56d2 /include/git2 | |
| parent | 5572d2b8a1668f3c2f35ec91d3f864f28f8ef987 (diff) | |
| download | libgit2-c0644c3fbb31c381afb2d0658b5c6e83432fd8c9.tar.gz | |
Make submodule fetchRecurse match other options
This removes the fetchRecurse compiler warnings and makes the
behavior match the other submodule options (i.e. the in-memory
setting can be reset to the on-disk value).
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/submodule.h | 13 | ||||
| -rw-r--r-- | include/git2/types.h | 19 |
2 files changed, 19 insertions, 13 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index af08ba6eb..d72432610 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -106,19 +106,6 @@ typedef enum { GIT_SUBMODULE_STATUS_WD_UNTRACKED)) != 0) /** - * Options for submodule recurse. - * - * * GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules - * * GIT_SUBMODULE_RECURSE_YES - recurse into submodules - * * GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when commit not already in local clone - */ -typedef enum { - GIT_SUBMODULE_RECURSE_NO = 0, - GIT_SUBMODULE_RECURSE_YES = 1, - GIT_SUBMODULE_RECURSE_ONDEMAND = 2, -} git_submodule_recurse_t; - -/** * Lookup submodule information by name or path. * * Given either the submodule name or path (they are usually the same), this diff --git a/include/git2/types.h b/include/git2/types.h index d88815d80..2229f6bf4 100644 --- a/include/git2/types.h +++ b/include/git2/types.h @@ -323,6 +323,25 @@ typedef enum { GIT_SUBMODULE_IGNORE_DEFAULT = 0 } git_submodule_ignore_t; +/** + * Options for submodule recurse. + * + * Represent the value of `submodule.$name.fetchRecurseSubmodules` + * + * * GIT_SUBMODULE_RECURSE_RESET - reset to the on-disk value + * * GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules + * * GIT_SUBMODULE_RECURSE_YES - recurse into submodules + * * GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when + * commit not already in local clone + */ +typedef enum { + GIT_SUBMODULE_RECURSE_RESET = -1, + + GIT_SUBMODULE_RECURSE_NO = 0, + GIT_SUBMODULE_RECURSE_YES = 1, + GIT_SUBMODULE_RECURSE_ONDEMAND = 2, +} git_submodule_recurse_t; + /** @} */ GIT_END_DECL |
