Skip to content

Commit 3a383e1

Browse files
authored
Merge pull request #5386 from gitbutlerapp/kv-branch-1
Fixes a bug where incorrect remote commits are shown when remote was rebased
2 parents e3b647b + be950b1 commit 3a383e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/gitbutler-stack/src/stack.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,10 @@ impl Stack {
574574
let head_commit = repo
575575
.find_reference(&head.remote_reference(&remote_name)?)?
576576
.peel_to_commit()?;
577-
let merge_base = repo.merge_base(head_commit.id(), default_target.sha)?;
577+
let target_commit = repo
578+
.find_reference(default_target.branch.to_string().as_str())?
579+
.peel_to_commit()?;
580+
let merge_base = repo.merge_base(head_commit.id(), target_commit.id())?;
578581
repo.log(head_commit.id(), LogUntil::Commit(merge_base), false)?
579582
.into_iter()
580583
.rev()

0 commit comments

Comments
 (0)