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
5961d5ea
Commit
5961d5ea
authored
Apr 15, 2013
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up example code.
parent
299a224b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/rev-list.c
+3
-3
No files found.
examples/rev-list.c
View file @
5961d5ea
...
...
@@ -14,7 +14,7 @@ static void check_error(int error_code, const char *action)
exit
(
1
);
}
static
int
push_commit
(
git_revwalk
*
walk
,
git_oid
*
oid
,
int
hide
)
static
int
push_commit
(
git_revwalk
*
walk
,
const
git_oid
*
oid
,
int
hide
)
{
if
(
hide
)
return
git_revwalk_hide
(
walk
,
oid
);
...
...
@@ -27,7 +27,7 @@ static int push_spec(git_repository *repo, git_revwalk *walk, const char *spec,
int
error
;
git_object
*
obj
;
if
((
error
=
git_revparse
(
&
obj
,
NULL
,
NULL
,
repo
,
spec
))
<
0
)
if
((
error
=
git_revparse
_single
(
&
obj
,
repo
,
spec
))
<
0
)
return
error
;
error
=
push_commit
(
walk
,
git_object_id
(
obj
),
hide
);
git_object_free
(
obj
);
...
...
@@ -36,7 +36,7 @@ static int push_spec(git_repository *repo, git_revwalk *walk, const char *spec,
static
int
push_range
(
git_repository
*
repo
,
git_revwalk
*
walk
,
const
char
*
range
,
int
hide
)
{
git_object
left
,
right
;
git_object
*
left
,
*
right
;
git_revparse_flag_t
flags
;
int
error
=
0
;
...
...
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