Files
git/builtin
Brandon Williams cbca060e10 ls-files: prevent prune_cache from overeagerly pruning submodules
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.

ls-files is the only caller of 'parse_pathspec()' which relies on the
behavior of the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag because it
uses the result to construct a common prefix of all provided pathspecs
which is then used to prune the index of all entries which don't have
that prefix.  Since submodules entries in the index don't have a
trailing slash 'prune_cache()' will be overeager and prune a submodule
'sub' if the common prefix is 'sub/'.  To correct this behavior, only
prune entries which don't match up to, but not including, a trailing
slash of the common prefix.

This is in preparation to remove the
PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag in a later patch.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-12 14:23:46 +09:00
..
2017-04-26 15:39:08 +09:00
2016-11-22 13:55:20 -08:00
2017-04-26 15:39:08 +09:00
2017-03-31 08:33:56 -07:00
2017-03-30 14:07:14 -07:00
2017-04-26 15:39:08 +09:00
2017-04-26 15:39:08 +09:00
2017-03-17 13:50:25 -07:00
2017-03-31 08:33:56 -07:00
2017-04-13 17:53:08 -07:00
2017-03-31 08:33:56 -07:00
2017-04-19 21:37:13 -07:00
2017-04-15 00:58:36 -07:00
2017-04-19 21:37:13 -07:00
2016-09-29 15:42:18 -07:00
2017-01-18 15:12:15 -08:00
2017-04-19 21:37:13 -07:00
2017-04-26 15:39:08 +09:00
2017-04-02 09:49:24 -07:00
2017-04-17 21:56:54 -07:00
2017-04-19 21:37:13 -07:00
2017-04-19 21:37:13 -07:00
2017-03-24 13:07:37 -07:00
2017-01-23 18:51:56 -08:00
2017-04-11 00:21:51 -07:00
2017-04-26 15:39:12 +09:00