Skip to content

Conversation

@abhinav
Copy link
Owner

@abhinav abhinav commented Oct 25, 2025

Previously, when attempting to delete an unmerged branch,
gs branch delete would prompt the user to confirm the deletion.
If the user declined the prompt,
the command would proceed to attempt the deletion anyway,
causing git to refuse the operation and the command to exit with an error.

This change checks whether the user declined the prompt,
and if so, skips the deletion for that branch
and logs an informational message instead of attempting the deletion.

Fixes #912

🤖 Generated with Claude Code

Previously, when attempting to delete an unmerged branch,
`gs branch delete` would prompt the user to confirm the deletion.
If the user declined the prompt,
the command would proceed to attempt the deletion anyway,
causing git to refuse the operation and the command to exit with an error.

This change checks whether the user declined the prompt,
and if so, skips the deletion for that branch
and logs an informational message instead of attempting the deletion.

Fixes #912

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@abhinav
Copy link
Owner Author

abhinav commented Oct 25, 2025

This change is part of the following stack:

Change managed by git-spice.

@abhinav abhinav merged commit f3972ce into main Oct 25, 2025
20 checks passed
@abhinav abhinav deleted the branch-delete-unreachable-no-delete branch October 25, 2025 21:37
abhinav added a commit that referenced this pull request Oct 26, 2025
Previously, when attempting to delete an unmerged branch,
`gs branch delete` would prompt the user to confirm the deletion.
If the user declined the prompt,
the command would proceed to attempt the deletion anyway,
causing git to refuse the operation and the command to exit with an
error.

This change checks whether the user declined the prompt,
and if so, skips the deletion for that branch
and logs an informational message instead of attempting the deletion.

Fixes #912

Co-authored-by: Claude <noreply@anthropic.com>
@abhinav abhinav mentioned this pull request Oct 26, 2025
abhinav added a commit that referenced this pull request Oct 26, 2025
Backport #914 to 0.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confirmation default behavior

2 participants