github / github/gh-stack

sync reports success (exit 0) when its internal push fails

Offen
#472 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
1.5k
Forks
70
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
7

Beschreibung

(This issue was AI generated but I have read it, understood it, and I'm accountable for its content.)

**Version**: gh-stack v0.1.0.

**Repro**: a stack whose branches are already pushed; rebase the stack locally (tips now require a force-push); run `gh stack sync`.

**Actual output**:

```
Pushing 3 branches to origin...
⚠ Push failed — branches may need force push after rebase
Run `gh stack push` to push with --force-with-lease.
...
✓ Stack synced
```

with **exit code 0**, while the branches were not pushed.

**Expected**: either sync pushes with `--force-with-lease --atomic` as its own documentation describes (step 5 of the sync help text), or the run exits non-zero when the push step fails. A warning followed by a success line and a zero exit makes sync unusable in scripts and easy to misread interactively.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start at the `gh stack sync` command and trace how the internal push result is handled after a rebased stack requires a force push. Reproduce the reported scenario, then verify that a failed push cannot produce a successful sync result or exit code; add or update a regression test if the surrounding command tests provide one.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, go
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.