Teardown -> stack branch -> setup workflow supported?#12146
Teardown -> stack branch -> setup workflow supported?#12146jonathantanmy2 wants to merge 1 commit intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Just wanted to drop by and add that I always refer to Maybe that helps to see what's really there, it would be a severe bug if there would be duplicate stacks like that. |
Notice that branch `A` appears 3 times in the status output.
ca99202 to
bb3a1eb
Compare
|
tsbs.tar.gz |
|
graph.txt Anyway it seems that from what you say, a commit shouldn't appear in 2 stacks like that, so I'll take a further look. |
I think ideally we would have only one stack with two branches in it (one on top of the other), but I can take a look after you've sent your PR. |
|
That's not possible, as the metadata says it must have two stacks (it's also displayed by metadata: Some(
Workspace {
ref_info: RefInfo { created_at: "2023-01-31 14:55:57 +0000", updated_at: None },
stacks: [
WorkspaceStack {
id: 00000000-0000-0000-0000-000000000000,
branches: [
WorkspaceStackBranch {
ref_name: "refs/heads/A",
archived: false,
},
],
workspacecommit_relation: Merged,
},
WorkspaceStack {
id: 00000000-0000-0000-0000-000000000001,
branches: [
WorkspaceStackBranch {
ref_name: "refs/heads/B",
archived: false,
},
],
workspacecommit_relation: Merged,
},
],
target_ref: "refs/remotes/origin/main",
target_commit_id: Sha1(0dc37334a458df421bf67ea806103bf5004845dd),
push_remote: "origin",
},
), |
|
Ah...that does make |
That I don't understand, could you provide context? |
One thing that I've struggled to do in GitButler is more complex stack manipulation - e.g. I would like to be able to have a stack with 2 branches, the bottom one being only a test and the top one being production code, and toggle the top one "on" and "off" to ensure that the test fails without the production code and passes with the production code. We don't seem to be able to do such complex manipulations without the rebase engine understanding refs (well, it does now, but only to a limited extent), so I thought that |
|
Ah, I see, thanks for sharing. There is already a notion of re-merging a workspace commit without including portions of a stack, as measured from its tip. This would perfectly serve the case you describe. |
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
|
Sorry for closing the PR like an issue 😅. If you rebase onto |

I was further looking into teardown/setup workflows. Is a workflow of teardown -> branch manipulation -> setup something that we want to support? If I teardown, put one branch on the other (with Git commands), and setup, I get branch
Aappearing 3 times in the status output.I could take a look at this, but wanted to check first to make sure that I wasn't digging too much into an unsupported use case.
This is on origin/master. Stacking this on my other PR (#12085) gives the same result (except that there is no
gitbutler/workspacebranch after teardown).