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
eb6bc45f
Commit
eb6bc45f
authored
Jun 19, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid uninitialized variable error.
parent
1d94a7d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/revparse.c
+2
-2
tests-clar/refs/revparse.c
+3
-0
No files found.
src/revparse.c
View file @
eb6bc45f
...
...
@@ -506,8 +506,8 @@ static int handle_linear_syntax(git_object **out, git_object *obj, const char *m
/* "~" is the same as "~1" */
if
(
*
movement
==
'\0'
)
{
n
=
1
;
}
else
{
git__strtol32
(
&
n
,
movement
,
NULL
,
0
)
;
}
else
if
(
git__strtol32
(
&
n
,
movement
,
NULL
,
0
)
<
0
)
{
return
GIT_ERROR
;
}
commit1
=
(
git_commit
*
)
obj
;
...
...
tests-clar/refs/revparse.c
View file @
eb6bc45f
...
...
@@ -104,6 +104,9 @@ void test_refs_revparse__to_type(void)
void
test_refs_revparse__linear_history
(
void
)
{
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"foo~bar"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"master~bar"
));
test_object
(
"master~0"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master~1"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"master~2"
,
"9fd738e8f7967c078dceed8190330fc8648ee56a"
);
...
...
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