Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

🤖 A workspace name that starts with a dash passes validation, then fails with a raw git error

Aperta Adatta ai principianti
#5,686 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, typescript

Direzione di ricerca

Inizia da src/common/utils/validation/workspaceValidation.ts e leggi entrambi i validatori dei nomi; poi controlla come WorktreeManager.ts passa i nomi dei branch a git. Esegui i test di validazione pertinenti e conferma che i nomi che iniziano con -, anche dopo uno /, vengano rifiutati sia dal modulo che dal backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Problem: Creating a workspace named -dash- passes the form check, then fails with git's "unknown switch" error.

Cause: the name patterns in src/common/utils/validation/workspaceValidation.ts accept a leading -. WorktreeManager.ts passes ["-b", branchName, ...] to git, which reads the name as options.

Fix idea: require the first character, and the first character after each /, to be [a-z0-9_] in both validators. The form and the backend use them, so both reject the name.

Priority P3 (the error is clear enough that no data is lost). Size S.

Found by the agent bug bashes in #5670 (pre-existing, outside that PR's changes).


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lingua principale
TypeScript
Stelle
2k
Fork
139
Merge medio
6h 20m
PR unite (30g)
943

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/xum

Tutte le issue di coder/xum

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.