Skip to content

Commit e83345c

Browse files
authored
Merge pull request #9803 from gitbutlerapp/kv-branch-50
fix(handler): avoid creating stacks when no assignments exist
2 parents c51fcb3 + 02b33a5 commit e83345c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/but-rules/src/handler.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ pub fn process_workspace_rules(
1414
dependencies: &Option<HunkDependencies>,
1515
) -> anyhow::Result<usize> {
1616
let mut updates = 0;
17+
if assignments.is_empty() {
18+
// Dont create stacks if there are no changes to assign anywhere
19+
return Ok(updates);
20+
}
1721
let rules = super::list_rules(ctx)?
1822
.into_iter()
1923
.filter(|r| r.enabled)

0 commit comments

Comments
 (0)