-
Notifications
You must be signed in to change notification settings - Fork 42
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
git up does a silly thing if a feature branch is rebased on master but not force-pushed yet. #64
Comments
Hey @fj128, first thanks for the awesome reproduction script and the effort you put into bug reports! Now regarding the issue, the the trouble is that for PyGitUp this might be a perfectly valid situation. Before running For PyGitUp it's just a situation where the local
How exactly would that look like? How would we differentiate this from a legal situation? |
So I stepped on the same rake today, and it's worse than purely accidentally doing What I had in mind was to compute the set difference: A valid situation similar to this might be if you do
But in this case you're typing the rebase command yourself, you generally wouldn't do So it would be nice if I don't know if this should be made default or enabled via a configuration option. On one hand, I really don't think that switching it on by default would break a lot of other people's workflows. On the other hand, the check will add a not-imperceptible delay, especially on larger repositories (and this applies to merely displaying warning too). I also don't know what's the best way of computing that difference, I was surprised that apparently you can't specify both
because this would take time proportional to the number of rebased commits, not reachable branches in the whole repository. Or maybe there's a way to tell git what we want directly. Bonus points for also being able to list all would-be-abandoned tags at the same time, because we probably want a warning/confirmation for those as well (though I personally would be completely satisfied with it working for branches for now). |
Sorry for not following up on this for so long! I currently don't have the capacity to look deeper into this issue (as I'm focusing on finishing up my master's degree), but I'm more than happy to accept contributions. |
If I work on my personal feature branch that I periodically rebase on master and force-push into origin, and I accidentally do
git up
after rebasing but before force-pushing, the result is weird and confusing: git up rebases local feature on remote feature, which produces rebased copies of all new commits in master.Maybe it could be possible to try and detect such situation and at least warn that something weird is going on? For example, check if there are local/remote branches that we will be leaving behind after rebase?
Or, I don't know, if that would bring a lot of complications and slow down operation for everyone, while addressing a relatively unusual workflow, oh well, at least if someone else stumbles upon it, they'll see this issue here.
This shell script reproduces the problem:
The text was updated successfully, but these errors were encountered: