github / github/gh-stack

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

Đang mở
#472 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
1.5k
Fork
70
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, go
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.