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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pierre Habouzit <madcoder@xxxxxxxxxx> writes:

> On Sun, Nov 25, 2007 at 10:27:09PM +0000, Junio C Hamano wrote:
>> Pierre Habouzit <madcoder@xxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux