Skip to content

Commit cbecdbb

Browse files
committed
fix: add split aborted error for commit split workflow
This adds a new error variant to clearly indicate when a commit split operation is aborted due to mixed staged and unstaged changes, improving user feedback and guiding them to resolve the conflict via stashing or using --no-split.
1 parent ad8e127 commit cbecdbb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/error.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ pub enum Error {
4848
)]
4949
SecretsDetected { patterns: Vec<String> },
5050

51+
#[error("Commit split aborted: files with both staged and unstaged changes")]
52+
#[diagnostic(
53+
code(commitbee::split::aborted),
54+
help("Stash or commit unstaged changes first, or use --no-split")
55+
)]
56+
SplitAborted,
57+
5158
#[error("Cannot connect to Ollama at {host}")]
5259
#[diagnostic(
5360
code(commitbee::ollama::not_running),

0 commit comments

Comments
 (0)