docs(git): the branch --base comment names the wrong guard #873

Open
opened 2026-10-22 17:31:07 +00:00 by hexajon · 0 comments
Owner

The gap

The comment at internal/cmd/git/branch.go:297-300 says that --base is passed before the -- terminator "so it can never be parsed as a flag". A -- after an operand does not protect that operand. The real guard is the ValidateRef call at :303, which refuses a leading dash. The code is safe; the comment states the wrong reason.

What I want

  • The comment names ValidateRef as the guard and says what the -- does.

Acceptance criteria

  • The comment matches the code.
## The gap The comment at `internal/cmd/git/branch.go:297-300` says that `--base` is passed before the `--` terminator "so it can never be parsed as a flag". A `--` after an operand does not protect that operand. The real guard is the `ValidateRef` call at `:303`, which refuses a leading dash. The code is safe; the comment states the wrong reason. ## What I want - The comment names `ValidateRef` as the guard and says what the `--` does. ## Acceptance criteria - [ ] The comment matches the code.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#873
No description provided.