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

Re: [PATCH] contrib: A script to show diff in new window while editing commit message.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2009, 23:59 UTC
Message-ID
<7vy6x4b48e.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1232577906-868-1-git-send-email-ted@tedpavlic.com>
Ted Pavlic <ted@tedpavlic.com> writes:
> It could be improved by supporting a command-line flag that would mimic
> the "git commit -v"-type behavior of opening the diff in the same window
> as the commit message. This would extend existing commands like "stg
> edit" that do not already have a "-v"-type option.

If a single-buffer operation is an improvement, then I do not see the point of this script.

 * Some people would like two-buffer operation and they may use this
   script as their core.editor.
 * Other people (including me) would find it very natural to use "\C-x 2"
   if they need to look at two places of the same buffer, because that is
   what they are used to do when editing a long file every day.  They just
   use "commit -v" without bothering with this script.
 * Yet other people (like Dscho) would find it too late to have a chance
   for final review when writing a commit log message anyway, and won't
   use either.
And I think choice is good.

Having said that, if the lack of "final chance to review the diff" in some StGIT subcommand is the real problem you are trying to solve, I think it is better solved by fixing StGIT. If this script can be used as a substitute for the real solution, that may be a welcome unintended side effect, but I do not think you should make it the main selling point of the script. After all people may not want to use this script when they are working directly with git, but still would want StGIT fixed.

Previous: Ted PavlicNext: Ted Pavlic
Message 5 of 11 in “Added giteditor script to show diff while editing commit message.”
  1. Added giteditor script to show diff while editing commit message.ted@tedpavlic.com, Jan 21, 2009
  2. Johannes SchindelinJan 21, 2009
  3. Ted PavlicJan 21, 2009
  4. contrib: A script to show diff in new window while editing commit message.Ted Pavlic, Jan 21, 2009
  5. Junio C HamanoJan 21, 2009
  6. Ted PavlicJan 22, 2009
  7. contrib: A script to show diff in new window while editing commit message.Ted Pavlic, Jan 22, 2009
  8. Junio C HamanoJan 22, 2009
  9. Johannes SchindelinJan 21, 2009
  10. Ted PavlicJan 22, 2009
  11. Ted PavlicJan 21, 2009

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.