Skip to content

Support spaces in worktree names#40

Merged
nwparker merged 1 commit intomainfrom
nwparker/support-spaces-in-names
Mar 23, 2026
Merged

Support spaces in worktree names#40
nwparker merged 1 commit intomainfrom
nwparker/support-spaces-in-names

Conversation

@nwparker
Copy link
Copy Markdown
Contributor

Summary

  • Sanitize user-provided worktree names by replacing whitespace runs with hyphens for branch names and directory paths
  • Preserve the original name (with spaces) as displayName in worktree metadata so it displays nicely in the sidebar

Test plan

  • Create a worktree with spaces in the name (e.g., "fix login bug")
  • Verify the branch is created as fix-login-bug (with configured prefix)
  • Verify the directory is created as fix-login-bug
  • Verify the sidebar shows the original name "fix login bug"
  • Create a worktree without spaces and confirm behavior is unchanged

🤖 Generated with Claude Code

Sanitize user-provided names by replacing whitespace with hyphens for
branch names and directory paths, while preserving the original name
as displayName in the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nwparker nwparker merged commit c2e4ae7 into main Mar 23, 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.

1 participant