summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 5dacacd469..517a569e10 100644
--- a/dir.c
+++ b/dir.c
@@ -380,6 +380,13 @@ static int match_pathspec_item(const struct index_state *istate,
return 0;
/*
+ * name has no wildcard, and it didn't match as a leading
+ * pathspec so return.
+ */
+ if (item->nowildcard_len == item->len)
+ return 0;
+
+ /*
* Here is where we would perform a wildmatch to check if
* "name" can be matched as a directory (or a prefix) against
* the pathspec. Since wildmatch doesn't have this capability