github / github/gh-stack

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

未關閉
#472 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
1.5k
分支
70
平均合併
1 天 8 小時
30 天內合併 PR
7

描述

(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.

貢獻指南

開啟貢獻指南

研究方向

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.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, go
領域
cli
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。