github / github/gh-stack

Stacking should handle rebases performed outside of gh stack

未关闭
#193 3 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
feature request topic: cli - general
主要语言
Go
星标
1.5k
派生
70
平均合并
1 天 8 小时
30 天内合并 PR
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 摘要。