github / github/gh-stack

Stacking should handle rebases performed outside of gh stack

オープン
#193 コメント 3 件 リアクション 6 件 担当者 0 名 GitHub で見る
feature request topic: cli - general
主要言語
Go
スター
1.5k
フォーク
70
平均マージ
1日 8時間
マージ済み PR(30日)
7

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, go
領域
cli, developer-experience
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。