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
25a1fab0
Commit
25a1fab0
authored
Dec 12, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2001 from ethomson/merge_version_validate
Validate struct versions in merge, revert
parents
0eedacb0
86a05ef3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
src/merge.c
+4
-0
src/revert.c
+2
-0
No files found.
src/merge.c
View file @
25a1fab0
...
...
@@ -1575,6 +1575,8 @@ int git_merge_trees(
*
out
=
NULL
;
GITERR_CHECK_VERSION
(
given_opts
,
GIT_MERGE_TREE_OPTS_VERSION
,
"git_merge_tree_opts"
);
if
((
error
=
merge_tree_normalize_opts
(
repo
,
&
opts
,
given_opts
))
<
0
)
return
error
;
...
...
@@ -2427,6 +2429,8 @@ int git_merge(
*
out
=
NULL
;
GITERR_CHECK_VERSION
(
given_opts
,
GIT_MERGE_OPTS_VERSION
,
"git_merge_opts"
);
if
(
their_heads_len
!=
1
)
{
giterr_set
(
GITERR_MERGE
,
"Can only merge a single branch"
);
return
-
1
;
...
...
src/revert.c
View file @
25a1fab0
...
...
@@ -179,6 +179,8 @@ int git_revert(
assert
(
repo
&&
commit
);
GITERR_CHECK_VERSION
(
given_opts
,
GIT_REVERT_OPTS_VERSION
,
"git_revert_opts"
);
if
((
error
=
git_repository__ensure_not_bare
(
repo
,
"revert"
))
<
0
)
return
error
;
...
...
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