anomalyco / anomalyco/opencode

Branch validation accepts names rejected by Git

Open
#48,763 1 comment 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 13, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Repository branch validation accepts several names that Git rejects, including trailing slashes or dots, repeated slashes, and components ending in .lock. These names pass application validation and fail later when Git tries to resolve or clone the requested branch, producing a less useful error. Validation should reject structurally invalid Git branch names before repository setup begins.

Plugins

None

OpenCode version

1.18.30

Steps to reproduce
  1. Validate each branch name: topic/, topic., topic//child, and topic.lock.
  2. Observe that the repository branch validator accepts all four.
  3. Run git check-ref-format --branch with each name.
  4. Observe that Git rejects all four.

Expected: application validation rejects branch names that Git cannot use.

Actual: validation succeeds and defers the failure to a later Git operation.

Screenshot and/or share link

Not applicable; the commands above reproduce the validation mismatch directly.

Operating System

All

Terminal

All

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.