Skip to content

Commit 6563847

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 baac659 commit 6563847

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,7 @@ impl BranchManager<'_> {
329329
}
330330

331331
// 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(&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 {
332+
if merge_base != default_target.sha {
340333
let mut rebase_output = None;
341334
let new_head = if stack.allow_rebasing {
342335
let gix_repo = self.ctx.gix_repo()?;

0 commit comments

Comments
 (0)