docs(git): the branch --base comment names the wrong guard #873
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#873
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gap
The comment at
internal/cmd/git/branch.go:297-300says that--baseis 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 theValidateRefcall at:303, which refuses a leading dash. The code is safe; the comment states the wrong reason.What I want
ValidateRefas the guard and says what the--does.Acceptance criteria