diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:56 -0800 |
commit | f4f233e13daa584e5178141eb10e6e9527a3454c (patch) | |
tree | 2705e845567749c51ba409d303502f5d4e576188 /tree-walk.c | |
parent | d7c6c2369ac21141b7c6cceaebc6414ec3da14ad (diff) | |
parent | eef3df5a93784e4d709907ce03006374ffc3ea26 (diff) | |
download | git-f4f233e13daa584e5178141eb10e6e9527a3454c.tar.gz |
Merge branch 'bw/pathspec-match-submodule-boundary'
An v2.12-era regression in pathspec match logic, which made it look
into submodule tree even when it is not desired, has been fixed.
* bw/pathspec-match-submodule-boundary:
pathspec: only match across submodule boundaries when requested
Diffstat (limited to 'tree-walk.c')
-rw-r--r-- | tree-walk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tree-walk.c b/tree-walk.c index 684f0e3373..63a87ed666 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -1011,7 +1011,8 @@ static enum interesting do_match(const struct name_entry *entry, * character. More accurate matching can then * be performed in the submodule itself. */ - if (ps->recursive && S_ISGITLINK(entry->mode) && + if (ps->recurse_submodules && + S_ISGITLINK(entry->mode) && !ps_strncmp(item, match + baselen, entry->path, item->nowildcard_len - baselen)) @@ -1060,7 +1061,7 @@ match_wildcards: * character. More accurate matching can then * be performed in the submodule itself. */ - if (ps->recursive && S_ISGITLINK(entry->mode) && + if (ps->recurse_submodules && S_ISGITLINK(entry->mode) && !ps_strncmp(item, match, base->buf + base_offset, item->nowildcard_len)) { strbuf_setlen(base, base_offset + baselen); |