Skip to content

fix: confirm force removal for submodule worktrees - #902

Closed
draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:worktree-force-removal
Closed

draxxris wants to merge 1 commit into
agegr:mainfrom
draxxris:worktree-force-removal

Conversation

@draxxris

Copy link
Copy Markdown
Contributor

No description provided.

agegr commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Thanks @draxxris! The bug is real: git refuses to remove a worktree with initialized submodules without --force, and I reproduced it with git 2.43.

I needed one small change and couldn't push to your fork, so it continues in #1007. Your commit is kept as is, plus:

  • The regex matches git's actual phrase, containing submodules.
  • The locked worktree pattern is gone. It never matched git's "locked working tree", and a locked worktree needs remove -f -f, so a single-force confirmation would fail again.
  • The confirmation text now also mentions submodules.

Closing in favor of #1007.


Generated by Claude Code

@agegr agegr closed this Sep 30, 2026
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.

2 participants