github / github/gh-stack

gh stack modify fails with untracked files

Aperta Adatta ai principianti
#111 4 commenti 6 reazioni 0 assegnatari Vedi su GitHub
bug topic: cli - modify
Lingua principale
Go
Stelle
1.5k
Fork
70
Merge medio
1g 8h
PR unite (30g)
7

Descrizione

`gh stack modify` preconditions fail if the current working directory has any untracked files and fails with the following message that seems to imply that untracked changes shouldn't be a problem, as there is nothing to stash or commit.

```
✗ uncommitted changes in working tree
Commit or stash your changes before running modify
```

Code that performs the check: https://github.com/github/gh-stack/blob/5ed5693ed6fcfa34228312abb09553e2580b6670/internal/git/gitops.go#L576

Perhaps this should ignore any lines starting with `?? `?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start in internal/git/gitops.go around the precondition check at line 576 and reproduce the failure with an untracked file in the working directory. Inspect how Git status output is classified, then verify that untracked files no longer block `gh stack modify` while genuinely uncommitted changes still do.

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

Valutazione

Stack tecnologico
go
Ambito
cli
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
82/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.