git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: call external editor from git-gui?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 14, 2007, 04:55 UTC
Message-ID
<20070814045511.GF27913@spearce.org>
In-Reply-To
<20070810153008.GA31759@diana.vm.bytemark.co.uk>
Karl Hasselstrm <kha@treskal.com> 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.
Previous: Karl HasselströmNext: Karl Hasselström
Message 2 of 7 in “call external editor from git-gui?”
  1. Karl HasselströmAug 10, 2007
  2. Shawn O. PearceAug 14, 2007
  3. Karl HasselströmAug 14, 2007
  4. Jan HudecAug 15, 2007
  5. Uwe Kleine-KönigAug 15, 2007
  6. David KastrupAug 15, 2007
  7. Mike RalphsonAug 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.