Skip to content

Commit e73c939

Browse files
committed
Don't rebase for change ids
This was relevant when we were using change ids for updating references, but we have since been enlightened and with the glory of the rebase engine, this is no longer needed.
1 parent 9564219 commit e73c939

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

crates/gitbutler-branch-actions/src/branch_manager/branch_creation.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,7 @@ impl BranchManager<'_> {
328328
}
329329
}
330330

331-
// Do we need to rebase the branch on top of the default target?
332-
333-
let has_change_id = repo
334-
.find_commit(stack.head_oid(&gix_repo)?.to_git2())?
335-
.change_id()
336-
.is_some();
337-
// If the branch has no change ID for the head commit, we want to rebase it even if the base is the same
338-
// This way stacking functionality which relies on change IDs will work as expected
339-
if merge_base != default_target.sha || !has_change_id {
331+
if merge_base != default_target.sha {
340332
let mut rebase_output = None;
341333
let new_head = if stack.allow_rebasing {
342334
let gix_repo = self.ctx.gix_repo()?;

0 commit comments

Comments
 (0)