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
This commit is contained in:
2
dir.c
2
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 */
|
||||
|
Reference in New Issue
Block a user