mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 07:25:44 +03:00
Merge pull request #4754 from gitbutlerapp/Use-correct-sides
Use the auto-resolution if the head is conflicted
This commit is contained in:
commit
3170042895
@ -402,13 +402,13 @@ impl RepositoryExt for git2::Repository {
|
|||||||
// we need to do a manual 3-way patch merge
|
// we need to do a manual 3-way patch merge
|
||||||
// find the base, which is the parent of to_rebase
|
// find the base, which is the parent of to_rebase
|
||||||
let base = if to_rebase.is_conflicted() {
|
let base = if to_rebase.is_conflicted() {
|
||||||
self.find_real_tree(to_rebase, ConflictedTreeKey::Ours)?
|
self.find_real_tree(to_rebase, ConflictedTreeKey::Base)?
|
||||||
} else {
|
} else {
|
||||||
let base_commit = to_rebase.parent(0)?;
|
let base_commit = to_rebase.parent(0)?;
|
||||||
self.find_real_tree(&base_commit, Default::default())?
|
self.find_real_tree(&base_commit, Default::default())?
|
||||||
};
|
};
|
||||||
// Get the original ours
|
// Get the original ours
|
||||||
let ours = self.find_real_tree(head, ConflictedTreeKey::Theirs)?;
|
let ours = self.find_real_tree(head, Default::default())?;
|
||||||
// Get the original theirs
|
// Get the original theirs
|
||||||
let thiers = self.find_real_tree(to_rebase, ConflictedTreeKey::Theirs)?;
|
let thiers = self.find_real_tree(to_rebase, ConflictedTreeKey::Theirs)?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user