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
4467543e
Commit
4467543e
authored
Jul 07, 2017
by
Patrick Steinhardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore: return early to avoid useless indentation
parent
9bd83622
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
src/ignore.c
+3
-5
No files found.
src/ignore.c
View file @
4467543e
...
@@ -51,8 +51,9 @@ static int does_negate_pattern(git_attr_fnmatch *rule, git_attr_fnmatch *neg)
...
@@ -51,8 +51,9 @@ static int does_negate_pattern(git_attr_fnmatch *rule, git_attr_fnmatch *neg)
git_attr_fnmatch
*
longer
,
*
shorter
;
git_attr_fnmatch
*
longer
,
*
shorter
;
char
*
p
;
char
*
p
;
if
((
rule
->
flags
&
GIT_ATTR_FNMATCH_NEGATIVE
)
==
0
if
((
rule
->
flags
&
GIT_ATTR_FNMATCH_NEGATIVE
)
!=
0
&&
(
neg
->
flags
&
GIT_ATTR_FNMATCH_NEGATIVE
)
!=
0
)
{
||
(
neg
->
flags
&
GIT_ATTR_FNMATCH_NEGATIVE
)
==
0
)
return
false
;
/* If lengths match we need to have an exact match */
/* If lengths match we need to have an exact match */
if
(
rule
->
length
==
neg
->
length
)
{
if
(
rule
->
length
==
neg
->
length
)
{
...
@@ -77,9 +78,6 @@ static int does_negate_pattern(git_attr_fnmatch *rule, git_attr_fnmatch *neg)
...
@@ -77,9 +78,6 @@ static int does_negate_pattern(git_attr_fnmatch *rule, git_attr_fnmatch *neg)
return
false
;
return
false
;
return
memcmp
(
p
,
shorter
->
pattern
,
shorter
->
length
)
==
0
;
return
memcmp
(
p
,
shorter
->
pattern
,
shorter
->
length
)
==
0
;
}
return
false
;
}
}
/**
/**
...
...
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