Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-17 21:30:42 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-17 21:30:43 +0300
commit13ed10efd422fe143a4d732100c25a6c6c60f656 (patch)
tree90608cc8db1a107cb9b27d913b392c42eab449b5 /dir.c
parentce481ac8b31c9061eeecd1ba0d7174b621f96632 (diff)
parentf4a8fde05781358558ea39b082cacb4204717753 (diff)
Merge branch 'jc/pathspec-match-with-common-prefix'
"git ls-files '(attr:X)D/'" that triggers the common prefix optimization codepath failed to read from "D/.gitattributes", which has been corrected. * jc/pathspec-match-with-common-prefix: dir: match "attr" pathspec magic with correct paths t6135: attr magic with path pattern
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 c9dc69fc24..8486e4d56f 100644
--- a/dir.c
+++ b/dir.c
@@ -376,7 +376,7 @@ static int match_pathspec_item(struct index_state *istate,
return 0;
if (item->attr_match_nr &&
- !match_pathspec_attrs(istate, name, namelen, item))
+ !match_pathspec_attrs(istate, name - prefix, namelen + prefix, item))
return 0;
/* If the match was just the prefix, we matched */