git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pierre Habouzit <madcoder@debian.org>
Cc: "J. Bruce Fields" <bfields@fieldses.org>, Git ML <git@vger.kernel.org>
Subject: Re: [RFC] best way to show diff of commit
Date: Sun, 25 Nov 2007 14:52:28 -0800	[thread overview]
Message-ID: <7v1waej5ub.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071125223150.GD21121@artemis.corp> (Pierre Habouzit's message of "Sun, 25 Nov 2007 23:31:50 +0100")

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.

  reply	other threads:[~2007-11-25 22:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-25 21:18 [RFC] best way to show diff of commit Pierre Habouzit
2007-11-25 21:27 ` J. Bruce Fields
2007-11-25 22:09   ` Pierre Habouzit
2007-11-25 22:27     ` Junio C Hamano
2007-11-25 22:31       ` Pierre Habouzit
2007-11-25 22:52         ` Junio C Hamano [this message]
2007-11-25 23:47           ` Pierre Habouzit
2007-11-25 23:43       ` David Brown
2007-11-26  0:25 ` Jan Hudec
2007-11-26  8:42   ` Pierre Habouzit
2007-11-26  8:47   ` Pierre Habouzit
2007-11-26  8:59     ` [PATCH] Make builtin-commit.c export GIT_INDEX_FILE for launch_editor as well Pierre Habouzit
2007-11-26  9:38       ` Pierre Habouzit
2007-11-26 15:27       ` Kristian Høgsberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v1waej5ub.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    --cc=madcoder@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).