Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stack/branch parking ability #506

Open
gr4cza opened this issue Nov 30, 2024 · 3 comments
Open

Add stack/branch parking ability #506

gr4cza opened this issue Nov 30, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gr4cza
Copy link
Contributor

gr4cza commented Nov 30, 2024

Most of the time, I have multiple stacks concurrently, and I know that a couple of them will not be merged in the near future.

It would be nice if we could mark those stacks or first branches as parked (I borrowed the term from Git Town), so when we run a restack on the trunk (or repo restack #505), we would skip restacking those.

We should also add a --force flag to force restacking parked stacks or branches.

@gr4cza
Copy link
Contributor Author

gr4cza commented Nov 30, 2024

Hi @abhinav,

I added a couple of enhancement ideas that I would use and would be happy to work on.
I hope that's not a problem!

@abhinav
Copy link
Owner

abhinav commented Dec 1, 2024

That's a cool idea! Right now I untrack branches that I'm pausing. This feels like a better way to go about it.

It would be pretty straightforward to add a "parked" bit to branch state (or a branch "type" in anticipation of other kinds of branches).

I can imagine variants of this operation for all stack scopes (branch, stack, upstack, and downstack).
I think the main question here is the naming and how to initiate the reverse.

# e.g.
gs branch park
gs branch unpark

# or this
gs branch freeze
gs branch thaw

Hi @abhinav,

I added a couple of enhancement ideas that I would use and would be happy to work on. I hope that's not a problem!

Not a problem. The suggestions are very welcome!

@abhinav abhinav added the enhancement New feature or request label Dec 1, 2024
@abhinav
Copy link
Owner

abhinav commented Dec 8, 2024

Thinking out loud/confirming:
Parking/freezing would prevent the PR from getting auto-restacked from any scope ({upstack, stack, repo} restack).
Only branch restack would explicitly restack parked branches.

I can see this being quite useful in my own workflow as well.
I sometimes start off a side-stack in the middle of a stack for exploratory work/experimentation that I'm not committed to yet.
If I then go back down and make a significant change to the lower branches, I don't want the exploratory branch(es) to be restacked or to resolve their conflicts until I'm sure I want to explore that route more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants