From: David Aguilar Date: Fri, 30 Dec 2011 01:59:58 GMT Subject: Re: git alias question Message-ID: In-Reply-To: On Thu, Dec 29, 2011 at 9:08 AM, Dave Borowitz wrote: > On Wed, Dec 28, 2011 at 17:27, Michael Horowitz > wrote: >> ldiff = "!git diff `git rev-list --reverse -n 2 HEAD -- $1` -- $1" > > FWIW, you can also do this as: >  ldiff = log -p -1 --format=format: -- > >> ldifft = "!git difftool `git rev-list --reverse -n 2 HEAD -- $1` -- $1" > > I don't know that you can do something equivalent with difftool. I > suppose you could do the above with "GIT_EXTERNAL_DIFF= wrapper> git ldiff", but that's not very helpful. difftool cannot be driven by log right now. It is something we thought would be helpful in the past: http://thread.gmane.org/gmane.comp.version-control.git/114269/focus=114367 On 2009-03-23 Junio C Hamano pobox.com> wrote: > Perhaps we would want a convenient way for "log -p" or "show -p" to drive > difftool as a backend? I think that's exactly it. difftool wraps diff; a log equivalent would be quite helpful. One idea is for difftool to learn a "--log" option to make it wrap log instead. I don't know if a diff-like command having a "--log" option is ideal from a consistency-of-user-interface POV so I'm open to ideas. It is convenient, though. It does seem like difftool would be a good place to expose this feature. I'd be interested in the "teach log / show -p about GIT_EXTERNAL_DIFF" route, if that sounds like a good idea. --             David