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

Re: [RFC] best way to show diff of commit

From
Pierre Habouzit <madcoder@debian.org>
Date
Nov 25, 2007, 23:47 UTC
Message-ID
<20071125234719.GF21121@artemis.corp>
In-Reply-To
<7v1waej5ub.fsf@gitster.siamese.dyndns.org>
On Sun, Nov 25, 2007 at 10:52:28PM +0000, Junio C Hamano wrote:
Show 25 quoted lines
> Pierre Habouzit <madcoder@debian.org> writes:
> 
> > On Sun, Nov 25, 2007 at 10:27:09PM +0000, Junio C Hamano wrote:
> >> Pierre Habouzit <madcoder@debian.org> writes:
> >> 
> >> >   Hmm it doesn't because I would have to call git commit -v each time I
> >> > commit and well I _like_ having the status better. And moreover I want
> >> > the diff to go in a separated buffer too.
> >> 
> >> I've never felt it a problem while editing the log message in Emacs.
> >> 
> >> Don't enhanced vi implementations let you split the same buffer into
> >> two allowing you to view different portions of it these days?
> >
> >   Well, maybe I could write my plugin so that it cuts the diff out from
> > the main buffer indeed, though I will have to learn using git commit -v
> > instead of git commit :P
> >
> >   That and the fact that the syntax colorization of the diff doesn't
> > work, but it's probably not up to git to fix that.
> 
> Or you can use pre-commit hook (which will be run with GIT_INDEX_FILE
> set to the index file used for the commit) to generate the diff in a
> separate file, and set EDITOR (or GIT_EDITOR) to a script around vim to
> open the given COMMIT_EDITMSG as well as that file you create.
  *ha* _that_ sounds more like the kind of things I was lurking for.
Sounds like a plan thanks :)
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Junio C HamanoNext: David Brown
Message 7 of 14 in “[RFC] best way to show diff of commit”
  1. Pierre HabouzitNov 25, 2007
  2. J. Bruce FieldsNov 25, 2007
  3. Pierre HabouzitNov 25, 2007
  4. Junio C HamanoNov 25, 2007
  5. Pierre HabouzitNov 25, 2007
  6. Junio C HamanoNov 25, 2007
  7. Pierre HabouzitNov 25, 2007
  8. David BrownNov 25, 2007
  9. Jan HudecNov 26, 2007
  10. Pierre HabouzitNov 26, 2007
  11. Pierre HabouzitNov 26, 2007
  12. Make builtin-commit.c export GIT_INDEX_FILE for launch_editor as well.Pierre Habouzit, Nov 26, 2007
  13. Pierre HabouzitNov 26, 2007
  14. Kristian HøgsbergNov 26, 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.