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
7b2f94bf
Commit
7b2f94bf
authored
Apr 05, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attr: use GIT_ASSERT
parent
c6e84bce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/attr.c
+12
-3
No files found.
src/attr.c
View file @
7b2f94bf
...
...
@@ -58,7 +58,9 @@ int git_attr_get(
git_attr_rule
*
rule
;
git_dir_flag
dir_flag
=
GIT_DIR_FLAG_UNKNOWN
;
assert
(
value
&&
repo
&&
name
);
GIT_ASSERT_ARG
(
value
);
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
name
);
*
value
=
NULL
;
...
...
@@ -123,7 +125,10 @@ int git_attr_get_many_with_session(
if
(
!
num_attr
)
return
0
;
assert
(
values
&&
repo
&&
names
);
GIT_ASSERT_ARG
(
values
);
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
pathname
);
GIT_ASSERT_ARG
(
names
);
if
(
git_repository_is_bare
(
repo
))
dir_flag
=
GIT_DIR_FLAG_FALSE
;
...
...
@@ -206,7 +211,8 @@ int git_attr_foreach(
git_strmap
*
seen
=
NULL
;
git_dir_flag
dir_flag
=
GIT_DIR_FLAG_UNKNOWN
;
assert
(
repo
&&
callback
);
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
callback
);
if
(
git_repository_is_bare
(
repo
))
dir_flag
=
GIT_DIR_FLAG_FALSE
;
...
...
@@ -378,6 +384,9 @@ int git_attr_add_macro(
git_attr_rule
*
macro
=
NULL
;
git_pool
*
pool
;
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
name
);
if
((
error
=
git_attr_cache__init
(
repo
))
<
0
)
return
error
;
...
...
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