Thread (7 messages) flat view 7 messages, 6 authors, 2016-06-15

Re: call external editor from git-gui?

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:29

Karl Hasselstrm [off-list ref] wrote:
git-gui is very good at composing commits. But for writing the actual
commit message -- especially if it's long and needs paragraph
reflowing, indentation, and so on -- I vastly prefer emacs over
git-gui's text field.
Yea, I've been thinking about adding fancy features like those.
But been lazy.  Spawning the user's preferred editor would be a
nice way to get some of that.
 
It seems to me like it would be straightforward to have a button or
something to launch the user's favorite editor for editing of the
commit message -- after all, git even knows what editor that is!
Probably.  git-gui already has the data from .git/config loaded in
memory, it should be fairly simple.
Unfortunately, with my tcl expertise, this is likely a whole-weekend
project, so I probably won't try to build it myself in the near
future.
With my busy schedule its unlikely to happen anytime soon either.
But I've added it to my todo branch.  Sometimes things on that list
get accomplished.  ;-)

An annoying work-around would be to run your editor to create/edit
.git/GITGUI_MSG (or .git/MERGE_MSG) then hit Rescan in git-gui.
It loads that file into its editor buffer if the editor buffer is
empty or has not been modified from within git-gui since the last
time the file was read.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help