diff options
| author | Russell Belfer <rb@github.com> | 2013-06-29 23:22:31 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-07-10 12:15:03 -0700 |
| commit | f9775a37aa4ed042839a6b2f9d8e0dfbd73a2f09 (patch) | |
| tree | d4e0fde8c090bf7d301dfa673538dd17d9a77f96 /src/submodule.h | |
| parent | 2e3e273e33894bc1089cfc09d89bd2cb144b108d (diff) | |
| download | libgit2-f9775a37aa4ed042839a6b2f9d8e0dfbd73a2f09.tar.gz | |
Add ignore_submodules to diff options
This adds correct support for an equivalent to --ignore-submodules
in diff, where an actual ignore value can be passed to diff to
override the per submodule settings in the configuration.
This required tweaking the constants for ignore values so that
zero would not be used and could represent an unset option to the
diff. This was an opportunity to move the submodule values into
include/git2/types.h and to rename the poorly named DEFAULT values
for ignore and update constants to RESET instead.
Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as
setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL
(which is actually a minor change from the old behavior in that
submodules will now be treated as UNMODIFIED deltas instead of
being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED).
This includes tests for the various new settings.
Diffstat (limited to 'src/submodule.h')
| -rw-r--r-- | src/submodule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/submodule.h b/src/submodule.h index 8db2fff29..b05937503 100644 --- a/src/submodule.h +++ b/src/submodule.h @@ -127,4 +127,12 @@ extern int git_submodule_open_bare( /* Release reference to submodule object - not currently for external use */ extern void git_submodule_free(git_submodule *sm); +extern int git_submodule_parse_ignore( + git_submodule_ignore_t *out, const char *value); +extern int git_submodule_parse_update( + git_submodule_update_t *out, const char *value); + +extern const char *git_submodule_ignore_to_str(git_submodule_ignore_t); +extern const char *git_submodule_update_to_str(git_submodule_update_t); + #endif |
