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
055fbf6d
Commit
055fbf6d
authored
Apr 05, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert: use GIT_ASSERT
parent
59f46913
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/revert.c
+6
-2
No files found.
src/revert.c
View file @
055fbf6d
...
@@ -129,7 +129,10 @@ int git_revert_commit(
...
@@ -129,7 +129,10 @@ int git_revert_commit(
git_tree
*
parent_tree
=
NULL
,
*
our_tree
=
NULL
,
*
revert_tree
=
NULL
;
git_tree
*
parent_tree
=
NULL
,
*
our_tree
=
NULL
,
*
revert_tree
=
NULL
;
int
parent
=
0
,
error
=
0
;
int
parent
=
0
,
error
=
0
;
assert
(
out
&&
repo
&&
revert_commit
&&
our_commit
);
GIT_ASSERT_ARG
(
out
);
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
revert_commit
);
GIT_ASSERT_ARG
(
our_commit
);
if
(
git_commit_parentcount
(
revert_commit
)
>
1
)
{
if
(
git_commit_parentcount
(
revert_commit
)
>
1
)
{
if
(
!
mainline
)
if
(
!
mainline
)
...
@@ -180,7 +183,8 @@ int git_revert(
...
@@ -180,7 +183,8 @@ int git_revert(
git_indexwriter
indexwriter
=
GIT_INDEXWRITER_INIT
;
git_indexwriter
indexwriter
=
GIT_INDEXWRITER_INIT
;
int
error
;
int
error
;
assert
(
repo
&&
commit
);
GIT_ASSERT_ARG
(
repo
);
GIT_ASSERT_ARG
(
commit
);
GIT_ERROR_CHECK_VERSION
(
given_opts
,
GIT_REVERT_OPTIONS_VERSION
,
"git_revert_options"
);
GIT_ERROR_CHECK_VERSION
(
given_opts
,
GIT_REVERT_OPTIONS_VERSION
,
"git_revert_options"
);
...
...
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