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
f152f8ac
Commit
f152f8ac
authored
Aug 26, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebase: preload all operations
parent
b6b636a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
include/git2/rebase.h
+2
-2
src/rebase.c
+0
-0
tests/rebase/merge.c
+12
-12
No files found.
include/git2/rebase.h
View file @
f152f8ac
...
...
@@ -156,13 +156,13 @@ GIT_EXTERN(int) git_rebase_open(git_rebase **out, git_repository *repo);
* working directory will be updated with the changes. If there are conflicts,
* you will need to address those before committing the changes.
*
* @param out
T
he rebase operation that is to be performed next
* @param out
Pointer to store t
he rebase operation that is to be performed next
* @param repo The rebase in progress
* @param checkout_opts Options to specify how the patch should be checked out
* @return Zero on success; -1 on failure.
*/
GIT_EXTERN
(
int
)
git_rebase_next
(
git_rebase_operation
*
operation
,
git_rebase_operation
*
*
operation
,
git_rebase
*
rebase
,
git_checkout_options
*
checkout_opts
);
...
...
src/rebase.c
View file @
f152f8ac
This diff is collapsed.
Click to expand it.
tests/rebase/merge.c
View file @
f152f8ac
...
...
@@ -27,7 +27,7 @@ void test_rebase_merge__next(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_status_list
*
status_list
;
const
git_status_entry
*
status_entry
;
...
...
@@ -47,8 +47,8 @@ void test_rebase_merge__next(void)
git_oid_fromstr
(
&
pick_id
,
"da9c51a23d02d931a486f45ad18cda05cf5d2b94"
);
cl_assert_equal_i
(
GIT_REBASE_OPERATION_PICK
,
rebase_operation
.
type
);
cl_assert_equal_oid
(
&
pick_id
,
&
rebase_operation
.
id
);
cl_assert_equal_i
(
GIT_REBASE_OPERATION_PICK
,
rebase_operation
->
type
);
cl_assert_equal_oid
(
&
pick_id
,
&
rebase_operation
->
id
);
cl_assert_equal_file
(
"da9c51a23d02d931a486f45ad18cda05cf5d2b94
\n
"
,
41
,
"rebase/.git/rebase-merge/current"
);
cl_assert_equal_file
(
"1
\n
"
,
2
,
"rebase/.git/rebase-merge/msgnum"
);
...
...
@@ -74,7 +74,7 @@ void test_rebase_merge__next_with_conflicts(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_status_list
*
status_list
;
const
git_status_entry
*
status_entry
;
...
...
@@ -114,8 +114,8 @@ void test_rebase_merge__next_with_conflicts(void)
git_oid_fromstr
(
&
pick_id
,
"33f915f9e4dbd9f4b24430e48731a59b45b15500"
);
cl_assert_equal_i
(
GIT_REBASE_OPERATION_PICK
,
rebase_operation
.
type
);
cl_assert_equal_oid
(
&
pick_id
,
&
rebase_operation
.
id
);
cl_assert_equal_i
(
GIT_REBASE_OPERATION_PICK
,
rebase_operation
->
type
);
cl_assert_equal_oid
(
&
pick_id
,
&
rebase_operation
->
id
);
cl_assert_equal_file
(
"33f915f9e4dbd9f4b24430e48731a59b45b15500
\n
"
,
41
,
"rebase/.git/rebase-merge/current"
);
cl_assert_equal_file
(
"1
\n
"
,
2
,
"rebase/.git/rebase-merge/msgnum"
);
...
...
@@ -140,7 +140,7 @@ void test_rebase_merge__next_stops_with_iterover(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
commit_id
;
int
error
;
...
...
@@ -193,7 +193,7 @@ void test_rebase_merge__commit(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
commit_id
,
tree_id
,
parent_id
;
git_signature
*
author
;
...
...
@@ -255,7 +255,7 @@ void test_rebase_merge__commit_updates_rewritten(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
commit_id
;
...
...
@@ -294,7 +294,7 @@ void test_rebase_merge__commit_drops_already_applied(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
commit_id
;
int
error
;
...
...
@@ -335,7 +335,7 @@ void test_rebase_merge__finish(void)
git_rebase
*
rebase
;
git_reference
*
branch_ref
,
*
upstream_ref
,
*
head_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
commit_id
;
git_reflog
*
reflog
;
...
...
@@ -398,7 +398,7 @@ static void test_copy_note(
git_reference
*
branch_ref
,
*
upstream_ref
;
git_merge_head
*
branch_head
,
*
upstream_head
;
git_commit
*
branch_commit
;
git_rebase_operation
rebase_operation
;
git_rebase_operation
*
rebase_operation
;
git_checkout_options
checkout_opts
=
GIT_CHECKOUT_OPTIONS_INIT
;
git_oid
note_id
,
commit_id
;
git_note
*
note
=
NULL
;
...
...
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