-
Notifications
You must be signed in to change notification settings - Fork 256
Improve usability of "interactive rebase" #1033
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
Improve usability of "interactive rebase" #1033
Conversation
Currently, That's the reason why this feature is limited to the current branch. |
is that something you might consider changing at some point? I often swithch between Windows, Linux and macOS for different projects, being able to use the same Git GUI client across all of them is super convenient. but since there no Linux version of Fork, this limitation in SourceGit means I end up needing to use three different clients overall. (edit) ok, so I just reproduced the scenario where I would normally use interactive rebase in this way, and I think I see why this would be an issue.. with my change in SourceGit, the commits that already exist in the target branch are also listed in the "rebase" window's commit list. when I do the same thing in Fork, these commits are not listed there. |
Yes. Fork runs the |
Signed-off-by: leo <longshuang@msn.cn>
You can test the latest CI build from Github Action. |
looks good to me, thank you! checked a few different scenarios, and it does seem to be filtering the list of commits correctly. I also realise now that the screenshots I shared above actually did show the problem you highlighted, I just didn't notice it at first.. apologies for that. |
strange indeed.. I haven't been using SourceGit for interactive rebases, so I'm not sure when this started happening.. I assumed it was from some change that was still "in progress", since I started on the it does still happen in the artifact I downloaded from GitHub Actions just now. should I log a new issue with a screenshot for reference so we can dig into it a bit more? |
my workflow often involves creating temporary branches to reorder commits before I push to remotes, and often I use interactive rebase to move some commits from one branch to another (much quicker than cherry picking them, especially when there are multiple to move).
however SourceGit has only ever allowed me to use an interactive rebase if the target is inline with my current branch, so I found myself continuously switching to another Git GUI for nothing more than just this step.
turns out this was quite easy to change, it actually took me longer to find the code that handles this than it did to change it... probably since this is the first time I've ever touched a C++ project (JetBrains Rider helped me big time here).
for reference, here are some screenshots of the change in action.
first the "Histories" panel, showing the context menu with the "Interactivly Rebase on Here" option:
then the "Interactive Rebase" window, scrolled to show the first commit to be moved:
the
current.Head != commit.SHA
condition was retained so that SourceGit doesn't allow anyone to try an interactive rebase to the currentHEAD
...@love-linger, do you have any objection to including this change?