mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 22:03:30 +03:00
Merge pull request #4756 from gitbutlerapp/Comments-and-another-enum-correction
Commits and another enum correction
This commit is contained in:
commit
564cd06666
@ -139,7 +139,7 @@ fn commit_conflicted_cherry_result<'repository>(
|
||||
|
||||
// If the commit we're rebasing is conflicted, use the commits original base.
|
||||
let base_tree = if to_rebase.is_conflicted() {
|
||||
repository.find_real_tree(&to_rebase, ConflictedTreeKey::Ours)?
|
||||
repository.find_real_tree(&to_rebase, ConflictedTreeKey::Base)?
|
||||
} else {
|
||||
let base_commit = to_rebase.parent(0)?;
|
||||
repository.find_real_tree(&base_commit, Default::default())?
|
||||
|
@ -402,12 +402,14 @@ impl RepositoryExt for git2::Repository {
|
||||
// we need to do a manual 3-way patch merge
|
||||
// find the base, which is the parent of to_rebase
|
||||
let base = if to_rebase.is_conflicted() {
|
||||
// Use to_rebase's recorded base
|
||||
self.find_real_tree(to_rebase, ConflictedTreeKey::Base)?
|
||||
} else {
|
||||
let base_commit = to_rebase.parent(0)?;
|
||||
// Use the parent's auto-resolution
|
||||
self.find_real_tree(&base_commit, Default::default())?
|
||||
};
|
||||
// Get the original ours
|
||||
// Get the auto-resolution
|
||||
let ours = self.find_real_tree(head, Default::default())?;
|
||||
// Get the original theirs
|
||||
let thiers = self.find_real_tree(to_rebase, ConflictedTreeKey::Theirs)?;
|
||||
|
Loading…
Reference in New Issue
Block a user