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
b44b262b
Commit
b44b262b
authored
4 years ago
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attr_file: use GIT_ASSERT
parent
7b2f94bf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/attr_file.c
+7
-4
No files found.
src/attr_file.c
View file @
b44b262b
...
@@ -351,7 +351,9 @@ uint32_t git_attr_file__name_hash(const char *name)
...
@@ -351,7 +351,9 @@ uint32_t git_attr_file__name_hash(const char *name)
{
{
uint32_t
h
=
5381
;
uint32_t
h
=
5381
;
int
c
;
int
c
;
assert
(
name
);
GIT_ASSERT_ARG
(
name
);
while
((
c
=
(
int
)
*
name
++
)
!=
0
)
while
((
c
=
(
int
)
*
name
++
)
!=
0
)
h
=
((
h
<<
5
)
+
h
)
+
c
;
h
=
((
h
<<
5
)
+
h
)
+
c
;
return
h
;
return
h
;
...
@@ -660,7 +662,8 @@ int git_attr_fnmatch__parse(
...
@@ -660,7 +662,8 @@ int git_attr_fnmatch__parse(
int
slash_count
,
allow_space
;
int
slash_count
,
allow_space
;
bool
escaped
;
bool
escaped
;
assert
(
spec
&&
base
&&
*
base
);
GIT_ASSERT_ARG
(
spec
);
GIT_ASSERT_ARG
(
base
&&
*
base
);
if
(
parse_optimized_patterns
(
spec
,
pool
,
*
base
))
if
(
parse_optimized_patterns
(
spec
,
pool
,
*
base
))
return
0
;
return
0
;
...
@@ -828,7 +831,7 @@ int git_attr_assignment__parse(
...
@@ -828,7 +831,7 @@ int git_attr_assignment__parse(
const
char
*
scan
=
*
base
;
const
char
*
scan
=
*
base
;
git_attr_assignment
*
assign
=
NULL
;
git_attr_assignment
*
assign
=
NULL
;
assert
(
assigns
&&
!
assigns
->
length
);
GIT_ASSERT_ARG
(
assigns
&&
!
assigns
->
length
);
git_vector_set_cmp
(
assigns
,
sort_by_hash_and_name
);
git_vector_set_cmp
(
assigns
,
sort_by_hash_and_name
);
...
@@ -954,7 +957,7 @@ void git_attr_rule__free(git_attr_rule *rule)
...
@@ -954,7 +957,7 @@ void git_attr_rule__free(git_attr_rule *rule)
int
git_attr_session__init
(
git_attr_session
*
session
,
git_repository
*
repo
)
int
git_attr_session__init
(
git_attr_session
*
session
,
git_repository
*
repo
)
{
{
assert
(
repo
);
GIT_ASSERT_ARG
(
repo
);
memset
(
session
,
0
,
sizeof
(
*
session
));
memset
(
session
,
0
,
sizeof
(
*
session
));
session
->
key
=
git_atomic_inc
(
&
repo
->
attr_session_key
);
session
->
key
=
git_atomic_inc
(
&
repo
->
attr_session_key
);
...
...
This diff is collapsed.
Click to expand it.
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