diff options
author | Brandon Williams <bmwill@google.com> | 2017-05-11 15:04:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-12 14:23:46 +0900 |
commit | c08397e3aa46fd0f0da29dfe5b257839b9c5d1c8 (patch) | |
tree | 7b86e30521606f9953e249db7dd3792d3eb4fe62 /submodule.h | |
parent | bdab972153a73815e04e9699406433e409ed28ab (diff) | |
download | git-c08397e3aa46fd0f0da29dfe5b257839b9c5d1c8.tar.gz |
pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag
Since (ae8d08242 pathspec: pass directory indicator to
match_pathspec_item()) the path matching logic has been able to cope
with submodules without needing to strip off a trailing slash if a path
refers to a submodule.
Since the stripping the trailing slash is no longer necessary, remove
the PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag. In addition, factor
out the logic which dies if a path decends into a submodule so that it
can still be used as a check after a pathspec struct has been
initialized.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.h')
-rw-r--r-- | submodule.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h index d11b4da40f..266d81f1c4 100644 --- a/submodule.h +++ b/submodule.h @@ -51,6 +51,8 @@ extern int is_submodule_initialized(const char *path); extern int is_submodule_populated_gently(const char *path, int *return_error_code); extern void die_in_unpopulated_submodule(const struct index_state *istate, const char *prefix); +extern void die_path_inside_submodule(const struct index_state *istate, + const struct pathspec *ps); extern int parse_submodule_update_strategy(const char *value, struct submodule_update_strategy *dst); extern const char *submodule_strategy_to_string(const struct submodule_update_strategy *s); |