Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detecting when a user wants to delete an unmerged or the current branch #1841

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

kaste
Copy link
Collaborator

@kaste kaste commented Dec 20, 2023

The error messages changed with 2.43.0 so we need to follow up here.

Since git 2.43.0 the error message starts with a lowercase letter.
Since git 2.43.0 the error message changed, it now starts lowercased
but also uses "used by worktree".

This actually clarifies the usage of the error and thus we add a check
that the user actually attempted to delete the currently checked out
branch.  (In other words: that the worktree is the current `repo_path`.)
Only then offer to detach and delete.
@kaste kaste enabled auto-merge December 20, 2023 12:50
@kaste kaste merged commit 923105e into master Dec 20, 2023
8 checks passed
@kaste kaste deleted the fix-not-merged-checking branch December 20, 2023 12:51
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.

1 participant