gh stack modify: modify fails when merged branches have been pruned
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 70
- Merge medio
- 1g 8h
- PR unite (30g)
- 7
Descrizione
Looks like modify can't deal with pruned branches once they have been merged.
See below output:
```
➜ token-scanning-service git:(aerendel/fix-generic-secrets-metadata) gh stack modify
✗ failed to apply modifications: building snapshot: resolving branch SHAs: failed to run git: fatal: ambiguous argument 'aerendel/mixed-content-types1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
```
### Observed behavior:
The bottom of my stack has been merged and the branch pruned so it doesn't exist locally or remotely anymore (not unusual once a branch is merged), and all `gh stack modify` operations fail to save. Any operation will fail, wether it's renaming a branch, reorganizing, dropping a branch, etc.
### Repro:
1. Make a stack with 2 or 3 layers
2. Merge the first layer
3. Delete the first layer's branch locally (or just answer Yes to gh stack's prune prompt)
4. Run `gh stack modify` and try to save any modify operation
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal flusso gh stack modify e dal passaggio di snapshot che risolve gli SHA dei branch, quindi riproduci il problema eliminando il branch inferiore di uno stack a due o tre livelli. Il lavoro è completo quando le operazioni di rinomina, riorganizzazione, eliminazione e altre operazioni di modifica possono essere salvate correttamente dopo che il branch unito è stato eliminato localmente e da remoto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, go
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100