Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
b67bc364
Commit
b67bc364
authored
Apr 17, 2015
by
Mike McQuaid
Committed by
Carlos Martín Nieto
May 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attr_file: fix subdirectory attr case.
Closes #2966.
parent
657ddf97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
src/attr_file.c
+8
-1
No files found.
src/attr_file.c
View file @
b67bc364
...
...
@@ -379,6 +379,7 @@ bool git_attr_fnmatch__match(
if
((
match
->
flags
&
GIT_ATTR_FNMATCH_DIRECTORY
)
&&
!
path
->
is_dir
)
{
int
matchval
;
char
*
matchpath
;
/* for attribute checks or root ignore checks, fail match */
if
(
!
(
match
->
flags
&
GIT_ATTR_FNMATCH_IGNORE
)
||
...
...
@@ -388,7 +389,13 @@ bool git_attr_fnmatch__match(
/* for ignore checks, use container of current item for check */
path
->
basename
[
-
1
]
=
'\0'
;
flags
|=
FNM_LEADING_DIR
;
matchval
=
p_fnmatch
(
match
->
pattern
,
path
->
path
,
flags
);
if
(
match
->
containing_dir
)
matchpath
=
path
->
basename
;
else
matchpath
=
path
->
path
;
matchval
=
p_fnmatch
(
match
->
pattern
,
matchpath
,
flags
);
path
->
basename
[
-
1
]
=
'/'
;
return
(
matchval
!=
FNM_NOMATCH
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment