aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-03 13:32:28 -0700
committerJunio C Hamano <gitster@pobox.com>2021-11-03 13:32:28 -0700
commit36f0a2e20f3eeeaef8c356a4c9d27c3a5a5e13d0 (patch)
treec5afe6636bf307c3b742e7461f076659f5ae55d3 /dir.c
parente2a33ef9e280def6f593b6dc7b9d07421c35b3db (diff)
parent5ceb663e926bd22248d1d72d70fa701c558587ea (diff)
downloadgit-36f0a2e20f3eeeaef8c356a4c9d27c3a5a5e13d0.tar.xz
Merge branch 'ds/add-rm-with-sparse-index'
Regression fix. * ds/add-rm-with-sparse-index: dir: fix directory-matching bug
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index c6d7a8647b..94489298f4 100644
--- a/dir.c
+++ b/dir.c
@@ -1294,7 +1294,7 @@ int match_pathname(const char *pathname, int pathlen,
* then our prefix match is all we need; we
* do not need to call fnmatch at all.
*/
- if (!patternlen && (!namelen || (flags & PATTERN_FLAG_MUSTBEDIR)))
+ if (!patternlen && !namelen)
return 1;
}