github / github/gh-stack

gh stack modify: modify fails when merged branches have been pruned

Aberta
#146 7 comentários 23 reações 0 responsáveis Ver no GitHub
bug topic: cli - modify
Linguagem predominante
Go
Estrelas
1.5k
Forks
70
Merge médio
1d 8h
PRs com merge (30d)
7

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo fluxo gh stack modify e pela etapa de snapshot que resolve os SHAs das branches; em seguida, reproduza o problema removendo a branch inferior de uma stack de duas ou três camadas. O trabalho estará concluído quando operações de renomear, reorganizar, remover e outras operações de modificação puderem ser salvas com sucesso depois que a branch mesclada for excluída localmente e remotamente.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
git, go
Domínio
cli
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
68/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.