All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Tim Henigan <tim.henigan@gmail.com>
Cc: gitster@pobox.com, git@vger.kernel.org, ramsay@ramsay1.demon.co.uk
Subject: Re: [PATCH 8/9 v13] difftool: teach difftool to handle directory diffs
Date: Sun, 15 Apr 2012 18:01:06 -0700	[thread overview]
Message-ID: <CAJDDKr78T1HNFXPPnvMUxBoJhAHP8XGdk9ZbpQCS1sZEQJfR8w@mail.gmail.com> (raw)
In-Reply-To: <CAJDDKr7Uw3Nwg4p7F2zaY8f82j3_tRf3WiiO+YSN+nA6a9wY6w@mail.gmail.com>

On Sun, Apr 15, 2012 at 3:20 PM, David Aguilar <davvid@gmail.com> wrote:
> On Fri, Apr 13, 2012 at 9:36 AM, Tim Henigan <tim.henigan@gmail.com> wrote:
>> When 'difftool' is called to compare a range of commits that modify
>> more than one file, it opens a separate instance of the diff tool for
>> each file that changed.
>>
>> The new '--dir-diff' option copies all the modified files to a temporary
>> location and runs a directory diff on them in a single instance of the
>> diff tool.
>>
>> Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
>> ---
>>
>> This replaces v12 of the script that was sent to the list on April 12, 2011.
>>
>> Changes in v13:
>>
>> The 'git diff' command is now called via 'Git->repository->command_oneline'
>> again. We need to run the command in a way that allows @ARGV to be given
>> as a list, rather than a string, to insure that IFS and shell meta-
>> characters are handled properly.  Thanks to Junio Hamano for pointing
>> this out [1].
>>
>> [1]: http://thread.gmane.org/gmane.comp.version-control.git/195326/focus=195353
>
> Thanks Tim.  Sorry for reading this patch out of context and missing
> the obvious point that it needs the diff output to do something useful
> in my last review.
>
> I started testing this patch.  I started on the commit before what's
> in pu and then applied this patch:
>
> $ git checkout e9653615fafcbac6109da99fac4fa66b0b432048
> $ git am difftool.patch
>
> The basics work and I know folks will be really happy when this
> feature lands.  Folks have personally asked me for this feature in the
> past.  I dig it.  I'd also like to help pursue using symlinks sometime
> in the future if that sounds like a reasonable thing to you, but the
> stabilizing the existing implementation is more important right now.
>
> I ran into some issues when trying it against a few random commits.  I
> went pretty far back in git's history to see what would happen.
>
> $ git difftool --dir-diff e5b06629de847663aaf0f7daae8de81338da3901 | tail
> Use of uninitialized value $rmode in string eq at
> /home/david/src/git/git-difftool line 96.

I did some more investigating.  I think this happens when the diff
contains detected renames.

This command made it work:

$ git difftool --dir-diff --no-renames e5b06629de847663aaf0f7daae8de81338da3901

So I think we might need to specify --no-renames when calling git diff --raw.

xxdiff still gives an error message about "$tmp/left/RelNotes: No such
file or directory" with --no-renames so we may want to touch some
dummy files to make the tools happy.
-- 
David

  reply	other threads:[~2012-04-16  1:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 16:36 [PATCH 8/9 v13] difftool: teach difftool to handle directory diffs Tim Henigan
2012-04-15 22:20 ` David Aguilar
2012-04-16  1:01   ` David Aguilar [this message]
2012-04-16  8:16     ` David Aguilar
2012-04-17 13:25     ` Tim Henigan
2012-04-18  3:23       ` David Aguilar
2012-04-18 13:13         ` Tim Henigan
2012-04-18 16:25           ` Junio C Hamano
2012-04-18 18:28             ` Tim Henigan
2012-04-18 19:38               ` Junio C Hamano
2012-04-19 17:11                 ` Tim Henigan
2012-04-19 18:49                   ` Junio C Hamano
2012-04-20  7:34                     ` David Aguilar
2012-04-20 16:58                       ` Tim Henigan

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=CAJDDKr78T1HNFXPPnvMUxBoJhAHP8XGdk9ZbpQCS1sZEQJfR8w@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    --cc=tim.henigan@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.