Re: [RFC] best way to show diff of commit
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