github / github/gh-stack

Stacking should handle rebases performed outside of gh stack

Aperta
#193 3 commenti 6 reazioni 0 assegnatari Vedi su GitHub
feature request topic: cli - general
Lingua principale
Go
Stelle
1.5k
Fork
70
Merge medio
1g 8h
PR unite (30g)
7

Descrizione

Let's say I have

```
trunk: AA1
branch1: BB1
branch2: CC1
```

The stack JSON will look something like this

```
{
"schemaVersion": 1,
"stacks": [{
"trunk": {
"branch": "master",
"head": "AA1"
},
"branches": [{
"branch": "branch1",
"head": "BB1",
"base": "AA1",
"pullRequest": {
// ...
}
}, {
"branch": "branch2",
"head": "CC1",
"base": "BB1",
"pullRequest": {
// ..
}
}
]
}
]
}
```

If I now perform an interactive rebase (**outside of gh stack**) - e.g. to _remove_ the head commit from branch1, or if I do something like `git reset HEAD^1 --hard` **from a branch1 checkout**, the stack has no knowledge of what has happened.

If I view the stack, there's now one fewer commit on branch1 (as expected) **but one extra commit on branch2**. I'd like / expect that commit to have been removed entirely from the stack.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Reproduce the stack with trunk, branch1, and branch2, then rebase or run `git reset HEAD^1 --hard` from the branch1 checkout and inspect the resulting stack view and JSON. Trace how gh stack detects branch bases and commit changes; done means commits removed from an upstream branch are not retained as extra commits in descendant branches.

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

Valutazione

Stack tecnologico
git, go
Ambito
cli, developer-experience
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.