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
19bca3d3
Unverified
Commit
19bca3d3
authored
Jan 08, 2019
by
Edward Thomson
Committed by
GitHub
Jan 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4922 from tiennou/fix/coverity-cids
Coverity fixes
parents
fba70a9d
a74f4fb9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
1 deletions
+32
-1
script/user_model.c
+23
-0
src/config.c
+2
-0
src/diff_tform.c
+2
-0
src/refs.c
+2
-0
src/submodule.c
+1
-1
tests/index/crlf.c
+2
-0
No files found.
script/user_model.c
View file @
19bca3d3
...
...
@@ -73,3 +73,26 @@ int git_buf_set(git_buf *buf, const void *data, size_t len)
buf
->
size
=
len
+
1
;
return
0
;
}
void
clar__fail
(
const
char
*
file
,
int
line
,
const
char
*
error
,
const
char
*
description
,
int
should_abort
)
{
if
(
should_abort
)
__coverity_panic__
();
}
void
clar__assert
(
int
condition
,
const
char
*
file
,
int
line
,
const
char
*
error
,
const
char
*
description
,
int
should_abort
)
{
if
(
!
condition
&&
should_abort
)
__coverity_panic__
();
}
src/config.c
View file @
19bca3d3
...
...
@@ -513,6 +513,8 @@ int git_config_backend_foreach_match(
regex_t
regex
;
int
error
=
0
;
assert
(
backend
&&
cb
);
if
(
regexp
!=
NULL
)
{
if
((
error
=
p_regcomp
(
&
regex
,
regexp
,
REG_EXTENDED
))
!=
0
)
{
giterr_set_regex
(
&
regex
,
error
);
...
...
src/diff_tform.c
View file @
19bca3d3
...
...
@@ -816,6 +816,8 @@ int git_diff_find_similar(
diff_find_match
*
best_match
;
git_diff_file
swap
;
assert
(
diff
);
if
((
error
=
normalize_find_opts
(
diff
,
&
opts
,
given_opts
))
<
0
)
return
error
;
...
...
src/refs.c
View file @
19bca3d3
...
...
@@ -709,6 +709,8 @@ int git_reference_rename(
git_signature
*
who
;
int
error
;
assert
(
out
&&
ref
);
if
((
error
=
git_reference__log_signature
(
&
who
,
ref
->
db
->
repo
))
<
0
)
return
error
;
...
...
src/submodule.c
View file @
19bca3d3
...
...
@@ -208,7 +208,7 @@ static int load_submodule_names(git_strmap **out, git_repository *repo, git_conf
if
((
error
=
git_config_iterator_glob_new
(
&
iter
,
cfg
,
key
))
<
0
)
goto
out
;
while
(
git_config_next
(
&
entry
,
iter
)
==
0
)
{
while
(
(
error
=
git_config_next
(
&
entry
,
iter
)
)
==
0
)
{
const
char
*
fdot
,
*
ldot
;
fdot
=
strchr
(
entry
->
name
,
'.'
);
ldot
=
strrchr
(
entry
->
name
,
'.'
);
...
...
tests/index/crlf.c
View file @
19bca3d3
...
...
@@ -353,6 +353,7 @@ void test_index_crlf__safecrlf_true_autocrlf_input_text_auto_attr(void)
cl_git_pass
(
git_index_add_bypath
(
g_index
,
"newfile.txt"
));
entry
=
git_index_get_bypath
(
g_index
,
"newfile.txt"
,
0
);
cl_assert
(
entry
);
cl_git_pass
(
git_oid_fromstr
(
&
oid
,
FILE_OID_LF
));
cl_assert_equal_oid
(
&
oid
,
&
entry
->
id
);
...
...
@@ -373,6 +374,7 @@ void test_index_crlf__safecrlf_true_autocrlf_input_text__no_attr(void)
cl_git_pass
(
git_index_add_bypath
(
g_index
,
"newfile.txt"
));
entry
=
git_index_get_bypath
(
g_index
,
"newfile.txt"
,
0
);
cl_assert
(
entry
);
cl_git_pass
(
git_oid_fromstr
(
&
oid
,
FILE_OID_LF
));
cl_assert_equal_oid
(
&
oid
,
&
entry
->
id
);
...
...
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