File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -8,18 +8,6 @@ use crate::{
8
8
9
9
use super :: CommitId ;
10
10
11
- fn rebase_branch_repo (
12
- repo : & Repository ,
13
- branch_name : & str ,
14
- ) -> Result < CommitId > {
15
- let branch = repo. find_branch ( branch_name, BranchType :: Local ) ?;
16
-
17
- let annotated =
18
- repo. reference_to_annotated_commit ( & branch. into_reference ( ) ) ?;
19
-
20
- conflict_free_rebase ( repo, & annotated)
21
- }
22
-
23
11
/// rebase current HEAD on `branch`
24
12
pub fn rebase_branch (
25
13
repo_path : & str ,
@@ -32,6 +20,18 @@ pub fn rebase_branch(
32
20
rebase_branch_repo ( & repo, branch)
33
21
}
34
22
23
+ fn rebase_branch_repo (
24
+ repo : & Repository ,
25
+ branch_name : & str ,
26
+ ) -> Result < CommitId > {
27
+ let branch = repo. find_branch ( branch_name, BranchType :: Local ) ?;
28
+
29
+ let annotated =
30
+ repo. reference_to_annotated_commit ( & branch. into_reference ( ) ) ?;
31
+
32
+ conflict_free_rebase ( repo, & annotated)
33
+ }
34
+
35
35
/// rebase attempt which aborts and undo's rebase if any conflict appears
36
36
pub fn conflict_free_rebase (
37
37
repo : & git2:: Repository ,
@@ -43,7 +43,6 @@ pub fn conflict_free_rebase(
43
43
let mut last_commit = None ;
44
44
while let Some ( op) = rebase. next ( ) {
45
45
let _op = op?;
46
- // dbg!(op.id());
47
46
48
47
if repo. index ( ) ?. has_conflicts ( ) {
49
48
rebase. abort ( ) ?;
You can’t perform that action at this time.
0 commit comments