Skip to content

Commit d217d96

Browse files
committed
Add transition for integration commit detection
1 parent 5f9c2e5 commit d217d96

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/gitbutler-branch-actions/src/integration.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::{branch_manager::BranchManagerExt, conflicts, VirtualBranchesExt};
1919

2020
const WORKSPACE_HEAD: &str = "Workspace Head";
2121
const GITBUTLER_INTEGRATION_COMMIT_TITLE: &str = "GitButler Integration Commit";
22+
const GITBUTLER_WORKSPACE_COMMIT_TITLE: &str = "GitButler Workspace Commit";
2223

2324
/// Creates and returns a merge commit of all active branch heads.
2425
///
@@ -330,11 +331,12 @@ fn verify_head_is_clean(ctx: &CommandContext, perm: &mut WorktreeWritePermission
330331
let integration_index = commits
331332
.iter()
332333
.position(|commit| {
333-
commit
334-
.message()
335-
.is_some_and(|message| message.starts_with(GITBUTLER_INTEGRATION_COMMIT_TITLE))
334+
commit.message().is_some_and(|message| {
335+
message.starts_with(GITBUTLER_WORKSPACE_COMMIT_TITLE)
336+
|| message.starts_with(GITBUTLER_INTEGRATION_COMMIT_TITLE)
337+
})
336338
})
337-
.context("GitButler integration commit not found")?;
339+
.context("GitButler workspace commit not found")?;
338340
let integration_commit = &commits[integration_index];
339341
let mut extra_commits = commits[..integration_index].to_vec();
340342
extra_commits.reverse();

0 commit comments

Comments
 (0)