stgit
stgit copied to clipboard
Publish series of patches to a branch, instead of all patches?
(yikes, clicked submit without filling out the issue! sorry! writing it now)
I just learned about StackedGit and it's awesome! I basically have a manual flow that I use to basically do most of what this lib does, so finding this is a godsend.
We use GitHub at work, which means that I need to eventually get my patches into PRs. Right now, I have a patch stack that's like 52 patches long, and I obviously don't want to submit that as one huge PR (my coworkers would hate me!). Right now what I'm doing is creating a new branch, picking a range of patches to that branch using stg pick
, and then putting that branch up for review. I do this with several branches from my stack. When I'm addressing comments, I address them in the base branch, update the patch, and then run sync
to update the PR branch.
This workflow is still better than what I had before, but I think what would be better is being able to stg publish
a range of patches to a branch, instead of always publishing all patches. This way, I could say stg publish -b pr-num-1 [patches for pr num 1]
, stg publish -b pr-num-2 [patches for pr num 2]
, and just continue doing that, merging or overriding any changes in the public branches (not really caring about the history there).
Is this something you would consider?
The one thing that might be kind of painful about this is the following case:
stg publish -b pr-foo patch-a
stg publish -b pr-bar patch-b
(but patch-b depends on patch-b, so really we'd want to stack this on top of patch-a, and then make sure that in github we say the base branch of pr-bar is pr-foo)
So maybe an idea to solve this is that we could specify a base branch in stg publish
as well?
Then, to publish updates to my stack, I could go:
stg publish --base-branch master -b pr-foo patch-a
stg publish --base-branch pr-foo -b pr-bar patch-b
I could script this ^^ for my use case :)
Curious to hear your thoughts, and thanks for keeping this great project alive!