From: David Aguilar <davvid@gmail.com>
To: Dave Borowitz <dborowitz@google.com>
Cc: Michael Horowitz <michael.horowitz@ieee.org>,
git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: git alias question
Date: Thu, 29 Dec 2011 17:59:58 -0800 [thread overview]
Message-ID: <CAJDDKr5a8TB82h4ULWtamLOVu_4Fv+cGw1YfEL987gM3yM4TMg@mail.gmail.com> (raw)
In-Reply-To: <CAD0k6qTp9sKCb==Jh1vuLuZoxx99Kt2Z=VAbjYbGaUE7nbOxdQ@mail.gmail.com>
On Thu, Dec 29, 2011 at 9:08 AM, Dave Borowitz <dborowitz@google.com> wrote:
> On Wed, Dec 28, 2011 at 17:27, Michael Horowitz
> <michael.horowitz@ieee.org> 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=<some difftool
> 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 <gitster <at> 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
next prev parent reply other threads:[~2011-12-30 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 1:27 git alias question Michael Horowitz
2011-12-29 3:21 ` Miles Bader
2011-12-29 5:32 ` Junio C Hamano
2011-12-29 17:08 ` Dave Borowitz
2011-12-30 1:59 ` David Aguilar [this message]
2011-12-31 21:31 ` Michael Horowitz
2011-12-31 23:30 ` Jakub Narebski
2012-01-02 5:57 ` Michael Horowitz
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=CAJDDKr5a8TB82h4ULWtamLOVu_4Fv+cGw1YfEL987gM3yM4TMg@mail.gmail.com \
--to=davvid@gmail.com \
--cc=dborowitz@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=michael.horowitz@ieee.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).