Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,7 @@ impl BranchManager<'_> {
}
}

// Do we need to rebase the branch on top of the default target?

let has_change_id = repo
.find_commit(stack.head_oid(&gix_repo)?.to_git2())?
.change_id()
.is_some();
// If the branch has no change ID for the head commit, we want to rebase it even if the base is the same
// This way stacking functionality which relies on change IDs will work as expected
if merge_base != default_target.sha || !has_change_id {
if merge_base != default_target.sha {
let mut rebase_output = None;
let new_head = if stack.allow_rebasing {
let gix_repo = self.ctx.gix_repo()?;
Expand Down
Loading