Repository navigation
fix(validators): accept { in a branch name, refusing only @{ (#324) - #338
Merged
baldurpan merged 2 commits intoNov 8, 2026
Merged
Conversation
git check-ref-format forbids { only as part of @{, so worktree branch,
worktree rename and the defaultSourceBranch config refused names such
as a{b that git accepts. @{ is now refused by a rule of its own.
Closes #324
There was a problem hiding this comment.
code-reviewer: looks good
The PR narrows isValidBranchName so that { on its own is accepted, while the git-forbidden sequence @{ is still refused by a separate /@\{/ rule with the same message. The new rule matches git check-ref-format. Tests cover a brace inside a name, braces around a name and a brace in a later component, and the existing @{ refusal rows still pass. The changeset is accurate. I found nothing that needs changing.
Reviewed 80ae46b for baldurpan · claude-opus-5-5 · 3 files · $0.12
baldurpan
deleted the
324-isvalidbranchname-refuses-anywhere-though-git
branch
November 8, 2026 21:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #324
What changed
isValidBranchName(src/lib/validators.ts) no longer refuses{on its own. That fixesworktree branch,worktree renameandworktree config --user defaultSourceBranchfor names such asa{bandorigin/a{b, whichgit check-ref-format --branchaccepts.@{is still refused. The{in the character class used to cover it; a separate/@\{/rule does now, with the same message (Branch name contains invalid characters).validators.test.tsaccepta{b,{x}andorigin/a{b. The existingbranch@{upstream}andbranch@{rows still expect the refusal..changeset/brace-branches.md,patch(confirmed by the maintainer).Gates
context/verify.md):pnpm check,pnpm typecheck,pnpm buildandpnpm test(55 files, 3808 tests) passed, and so didpnpm docs:test(748 tests).pnpm --filter docs typecheck,pnpm docs:buildandworker:bundle-checkwere not run. This change touches no docs code.reviewersubagent): PASS WITH NOTES, with nothing blocking. The reviewer checked every case againstgit check-ref-format --branch.a{b,{x},origin/a{b,{and}are valid.@{,a@{b,branch@{andbranch@{upstream}are not.context/release.mdasks for random note filenames.brace-branches.mdis descriptive, likeat-sign-branches.mdin fix(validators): accept @ in a branch name, refusing only @{ and a lone @ (#320) #325. Left as is.Docs
docs/,README.mdandskills/were searched, and none of them says{is refused. Nothing needed changing.