-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add --base option #56
Conversation
This is particularly useful for when the local development branch has diverged from its remote counterpart due to a previous rebase.
Hey, thanks for the PR I like the idea of this but I find a bit confusing to reason about what the revision range becomes. I think it should go something like this
Main difference being if there's an And either way lets try to get this logic grouped together because it's really about the same thing anyway. |
Hello. In my specific case I would like the opposite: the closest ancestor branch (i.e. autobase) to take precedence over I'd like to suggest an alternative approach then. We get rid of Then, the base of the revision range would decided in the following order:
What do you think? |
I like that, it is a priority order that's easy to understand and considering I don't quite follow how you think |
Yes. We can extract However, now that I think a bit more about it, it just seems to over-complicate things. I could just use the branch name for |
Alright, |
This makes the CLI simpler to reason about.
Hi there! Sorry it took long. I just added a commit that changes the code to conform what we discussed. I think it might make sense to squash the two commits. |
LGTM, I'll merge with a squash |
I am meditating over this change and I wonder whether Let’s consider this situation: flowchart TD
current["staging"] --> A'@{ label: "A'" }
A' --> B'@{ label: "B'" }
B' --> C["C"]
B["B"] --> C
A["A (branch 'remote')"] --> B
style A stroke:#00C853
style B stroke:#00C853
|
The default should be something close to "everything on my branch" (So, 'C..staging' in your example) The problem with I see your point about using remote commits though. However, in practice (for my workflow), it ends up working because I am using stacked branches a lot and I'm always rebasing on Perhaps it would be better to use the merge-base |
You are absolutely right about stacked branches. I will have to think about it, my point was just that |
I'm not sure if |
Hi there!
This is particularly useful for when the local development branch has diverged from its remote counterpart due to a previous rebase. This was the main motivation for me to implement such a feature.
Best regards,
Gustavo Sousa