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 an interactive rebase GUI with drag + drop editing #1

Closed
davvid opened this Issue Jun 14, 2009 · 5 comments

Comments

Projects
None yet
3 participants
@davvid
Member

davvid commented Jun 14, 2009

A gui for 'git rebase -i' would royally rock.

We'd need to check on the status on git-sequencer. Ideally we'd just be providing an interactive front end to the 'rebase -i' text file, though integrating more tightly might mean implementing parts of rebase in python.

@sylr

This comment has been minimized.

Show comment
Hide comment
@sylr

sylr May 28, 2010

I second that.

sylr commented May 28, 2010

I second that.

@ghost ghost assigned davvid Nov 5, 2011

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Nov 5, 2011

Member

git 1.7.8 (not yet released) would allow us to do, for example:

$ git config --global sequencer.editor /usr/share/git-cola/bin/git-cola-rebase

...and use a custom GUI as the rebase editor. We could do all the drag/drop editing in there.

Older versions of git could accomplish the same thing by doing:

$ GIT_EDITOR=/usr/share/git-cola/bin/git-cola-rebase git rebase -i commit

So that could be one way to do it.

Newer git versions understand "fixup" and "exec" so we'll need to do some version checks so that we can suppress that option for older versions.

I'm not really sure how to best handle "reword", "edit", and "squash".

Hijacking "GIT_EDITOR" means git would execute git-cola-rebase as the editor when editing commit messages ("squash", "reword"). We obviously do not want that -- we want it to execute the regular editor e.g. gvim, or whatever git would normally use as its editor.

Do we need to make sure that core.editor is not set to something like vim which expects a terminal? We should at least warn.

It wouldn't be a bad idea to have a simple skeletor version for drag and drop re-ordering. That subset of features is safe and won't bring in the GIT_EDITOR dragons.

We could guard the advanced features behind a git-1.7.8 version check and a runtime check to ensure that GIT_EDITOR is not defined to the rebase script. We'll need to read older versions of git-rebase--interactive.sh to see what the lower bound is on the git versions to support.

In any case, I think writing a custom editor over the rebase instruction sheet is probably the way to go. What do you think @ugtar?

Member

davvid commented Nov 5, 2011

git 1.7.8 (not yet released) would allow us to do, for example:

$ git config --global sequencer.editor /usr/share/git-cola/bin/git-cola-rebase

...and use a custom GUI as the rebase editor. We could do all the drag/drop editing in there.

Older versions of git could accomplish the same thing by doing:

$ GIT_EDITOR=/usr/share/git-cola/bin/git-cola-rebase git rebase -i commit

So that could be one way to do it.

Newer git versions understand "fixup" and "exec" so we'll need to do some version checks so that we can suppress that option for older versions.

I'm not really sure how to best handle "reword", "edit", and "squash".

Hijacking "GIT_EDITOR" means git would execute git-cola-rebase as the editor when editing commit messages ("squash", "reword"). We obviously do not want that -- we want it to execute the regular editor e.g. gvim, or whatever git would normally use as its editor.

Do we need to make sure that core.editor is not set to something like vim which expects a terminal? We should at least warn.

It wouldn't be a bad idea to have a simple skeletor version for drag and drop re-ordering. That subset of features is safe and won't bring in the GIT_EDITOR dragons.

We could guard the advanced features behind a git-1.7.8 version check and a runtime check to ensure that GIT_EDITOR is not defined to the rebase script. We'll need to read older versions of git-rebase--interactive.sh to see what the lower bound is on the git versions to support.

In any case, I think writing a custom editor over the rebase instruction sheet is probably the way to go. What do you think @ugtar?

@ugtar

This comment has been minimized.

Show comment
Hide comment
@ugtar

ugtar Jan 2, 2012

Member

mmmm... I think this issue is git cola's white whale =)

Member

ugtar commented Jan 2, 2012

mmmm... I think this issue is git cola's white whale =)

davvid added a commit to davvid/git-cola that referenced this issue Oct 6, 2013

git-xbase: add an interactive rebase editor
git-xbase is a standalone rebase editor that can be used
from the command-line, e.g.:

	GIT_SEQUENCE_EDITOR=$PWD/share/git-cola/bin/git-xbase git rebase -i master

Subsequent commits will integrate this script into the git-cola UI.

Related-to: #1

Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in 3c9b90f Oct 6, 2013

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Oct 6, 2013

Member

Modern Git understands GIT_SEQUENCE_EDITOR, which is what allowed us to finally spot that white 🐳 ;-)

It took a while, but it's not too shabby. It might be worth making it so that we show the message + diff when clicking a commit as a future enhancement.

Member

davvid commented Oct 6, 2013

Modern Git understands GIT_SEQUENCE_EDITOR, which is what allowed us to finally spot that white 🐳 ;-)

It took a while, but it's not too shabby. It might be worth making it so that we show the message + diff when clicking a commit as a future enhancement.

@ugtar

This comment has been minimized.

Show comment
Hide comment
@ugtar

ugtar Oct 6, 2013

Member

woohoo!

On Sun, Oct 6, 2013 at 2:33 PM, David Aguilar notifications@github.comwrote:

Modern Git understands GIT_SEQUENCE_EDITOR, which is what allowed us to
finally spot that white [image: 🐳] ;-)

It took a while, but it's not too shabby. It might be worth making it so
that we show the message + diff when clicking a commit as a future
enhancement.


Reply to this email directly or view it on GitHubhttps://github.com/git-cola/git-cola/issues/1#issuecomment-25767368
.

Uri

Please consider the environment before printing this message.
http://wwf.panda.org/savepaper/

Member

ugtar commented Oct 6, 2013

woohoo!

On Sun, Oct 6, 2013 at 2:33 PM, David Aguilar notifications@github.comwrote:

Modern Git understands GIT_SEQUENCE_EDITOR, which is what allowed us to
finally spot that white [image: 🐳] ;-)

It took a while, but it's not too shabby. It might be worth making it so
that we show the message + diff when clicking a commit as a future
enhancement.


Reply to this email directly or view it on GitHubhttps://github.com/git-cola/git-cola/issues/1#issuecomment-25767368
.

Uri

Please consider the environment before printing this message.
http://wwf.panda.org/savepaper/

davvid added a commit to davvid/git-cola that referenced this issue Oct 7, 2013

git xbase: add an inline diff viewer
Add a diff viewer (the same as the one used in the DAG viewer) to
display commits as they are selected in the list.

Allow launching an external diff via "git difftool".
Move the help message into a menu action.

Related-to: #1

Signed-off-by: David Aguilar <davvid@gmail.com>

Vdragon added a commit that referenced this issue Nov 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment