Skip to content

Don't rebase for change ids #8269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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