Skip to content

Fix diff parser for quoted paths and use UUID for branch names#41

Merged
that-github-user merged 1 commit intomainfrom
issue-25-26-diff-parser-uuid
Mar 28, 2026
Merged

Fix diff parser for quoted paths and use UUID for branch names#41
that-github-user merged 1 commit intomainfrom
issue-25-26-diff-parser-uuid

Conversation

@that-github-user
Copy link
Copy Markdown
Owner

Summary

  • Fix diff parser regex to handle filenames with spaces (quoted paths in git diff output)
  • Replace Date.now() with crypto.randomUUID() for worktree branch names to prevent collisions
  • New test for quoted path parsing

Change type

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI / infrastructure
  • Chore

Related issue

Closes #25
Closes #26

How to test

npm test  # 41 tests pass

Breaking changes

  • This PR introduces breaking changes

🤖 Generated with Claude Code

- Diff parser regex now handles filenames with spaces (quoted paths)
- Worktree branch names use crypto.randomUUID() instead of Date.now()
  to prevent collision when running multiple thinktank processes
- Added test for quoted path diff parsing

Closes #25
Closes #26

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user
Copy link
Copy Markdown
Owner Author

Self-review: Regex tested with both quoted and unquoted paths. UUID import from node:crypto is stable. 41 tests pass, lint clean.

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.

Use crypto.randomUUID() for worktree branch names to prevent collisions Fix diff parser regex to handle filenames with spaces and special chars

1 participant