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
3b83bdac
Commit
3b83bdac
authored
Nov 07, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #470 from schu/test-helpers-no-assert
test_helpers: do not rely on assert
parents
f8e8c8d4
ec907944
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tests/test_helpers.c
+4
-2
No files found.
tests/test_helpers.c
View file @
3b83bdac
...
...
@@ -116,7 +116,8 @@ int loose_object_mode(const char *repository_folder, git_object *object)
struct
stat
st
;
locate_loose_object
(
repository_folder
,
object
,
&
object_path
,
NULL
);
assert
(
p_stat
(
object_path
,
&
st
)
==
0
);
if
(
p_stat
(
object_path
,
&
st
)
<
0
)
return
0
;
free
(
object_path
);
return
st
.
st_mode
;
...
...
@@ -138,7 +139,8 @@ int loose_object_dir_mode(const char *repository_folder, git_object *object)
}
}
assert
(
p_stat
(
object_path
,
&
st
)
==
0
);
if
(
p_stat
(
object_path
,
&
st
)
<
0
)
return
0
;
free
(
object_path
);
return
st
.
st_mode
;
...
...
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