aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-05-13 14:05:07 -0700
committerJunio C Hamano <gitster@pobox.com>2025-05-13 14:05:07 -0700
commit330a09e4a5160923f2aa4b30afab913a10a06adb (patch)
tree4c4bf7cd3c93b28a7db603b6bfe609a70fd45a0f /dir.c
parentacfcd7ca93e0f23893baee804e1f490c928363bd (diff)
parentec727e189cce9e8457e2b00e0756cfdf325a12d9 (diff)
downloadgit-330a09e4a5160923f2aa4b30afab913a10a06adb.tar.xz
Merge branch 'kj/glob-path-with-special-char'
"git add 'f?o'" did not add 'foo' if 'f?o', an unusual pathname, also existed on the working tree, which has been corrected. * kj/glob-path-with-special-char: dir.c: literal match with wildcard in pathspec should still glob
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index e11342e136..a374972b62 100644
--- a/dir.c
+++ b/dir.c
@@ -518,7 +518,8 @@ static int do_match_pathspec(struct index_state *istate,
( exclude && !(ps->items[i].magic & PATHSPEC_EXCLUDE)))
continue;
- if (seen && seen[i] == MATCHED_EXACTLY)
+ if (seen && seen[i] == MATCHED_EXACTLY &&
+ ps->items[i].nowildcard_len == ps->items[i].len)
continue;
/*
* Make exclude patterns optional and never report