File tree 2 files changed +4
-2
lines changed
crates/gitbutler-repo/src
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ fn commit_conflicted_cherry_result<'repository>(
139
139
140
140
// If the commit we're rebasing is conflicted, use the commits original base.
141
141
let base_tree = if to_rebase. is_conflicted ( ) {
142
- repository. find_real_tree ( & to_rebase, ConflictedTreeKey :: Ours ) ?
142
+ repository. find_real_tree ( & to_rebase, ConflictedTreeKey :: Base ) ?
143
143
} else {
144
144
let base_commit = to_rebase. parent ( 0 ) ?;
145
145
repository. find_real_tree ( & base_commit, Default :: default ( ) ) ?
Original file line number Diff line number Diff line change @@ -402,12 +402,14 @@ impl RepositoryExt for git2::Repository {
402
402
// we need to do a manual 3-way patch merge
403
403
// find the base, which is the parent of to_rebase
404
404
let base = if to_rebase. is_conflicted ( ) {
405
+ // Use to_rebase's recorded base
405
406
self . find_real_tree ( to_rebase, ConflictedTreeKey :: Base ) ?
406
407
} else {
407
408
let base_commit = to_rebase. parent ( 0 ) ?;
409
+ // Use the parent's auto-resolution
408
410
self . find_real_tree ( & base_commit, Default :: default ( ) ) ?
409
411
} ;
410
- // Get the original ours
412
+ // Get the auto-resolution
411
413
let ours = self . find_real_tree ( head, Default :: default ( ) ) ?;
412
414
// Get the original theirs
413
415
let thiers = self . find_real_tree ( to_rebase, ConflictedTreeKey :: Theirs ) ?;
You can’t perform that action at this time.
0 commit comments