[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jgit-dev] A vision on rebase
- From: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
- Date: Mon, 24 Sep 2012 07:55:36 +0200
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20120905 Thunderbird/16.0
After reading a Dariusz patches in Gerrit for more rebase operations,
we only have "pick" today, and no interaction, here is *my* "vision" of
how it could work. It's not very complicated as an idea so if someone
has a similar idea I would not be surprised.
Image the user it viewing his/her history
o fix a[HEAD]
o fix b
o fix c
o fix d
Now the user drags "fix c" to HEAD, signifying that he wants to reorder
the commits. EGit rewires the graph after checking for branches
that could lead the user into problem, due to the usual issues with
published work etc, and other problems, i.e. attemting rebase on
other branches than the current may not be the proper thing to
do, though I can imaging exceptions.
EGit now enters interactive rebase mode, similar to how git
invokes the editor, but we're flashier.
A new planned branch appears in the history view.
Øpick fix c'
Øpick fix a'
o fix a |
| Øpick fix b'
o fix b |
o fix c |
o fix d ----´
x' is the rebased version of x and the rebase commands appear as labels.
By default the commands are pick.
The planned branch would have differently colored nodes and shapes so
the use clearly sees what are real commits and what are plans.
In addition the user should be able to copy-paste (i.e. cherry-pick) any
commit into the planned branch, delete, edit and so on.
The user would also be able to immediately get feedback on conflict that
would appear from the proposed edits.
During rebase the view would be updated so the user sees how much of the
work has actually been performed.
The visual effect of this related to EGit, but I think JGit would be the
logical place for some of the logic beyonds the traditional rebase. E.g.
we'd need to do a simulation for the quick-feedback regarding conflicts.
I'm not sure about how to handle conflicts here. If a' has a conflict,
then the resolution of that conflict affects whether 'c would introduce
conflicts, so there may be situations where there may not be possible
to predict all conflicts, but then perhaps a worst-case scenario could