All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Henigan <tim.henigan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, davvid@gmail.com, ramsay@ramsay1.demon.co.uk
Subject: Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs
Date: Thu, 12 Apr 2012 15:10:45 -0400	[thread overview]
Message-ID: <CAFouetg6Ot8sKiNi45A0QRv6YYdL3Mwrb3tkVkajQQuZukSp3g@mail.gmail.com> (raw)
In-Reply-To: <7viph46c1t.fsf@alter.siamese.dyndns.org>

On Thu, Apr 12, 2012 at 2:27 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Tim Henigan <tim.henigan@gmail.com> writes:
>
>> +sub setup_dir_diff
>> +{
>> +     # Run the diff; exit immediately if no diff found
>> +     my $cmd = "git diff --raw --no-abbrev -z " . join(" ", @ARGV);
>> +     my $diffrtn = `$cmd` or die $!;
>
> Why this change?  It looks like a rather unpleasant regression compared to
> the previous one that used "command_oneline", so that each element of
> @ARGV was given as a single argument to the command.  Now, you are
> splitting any argument that has $IFS in it.

The 'Git->repository->command*' functions all override the
$GIT_WORK_TREE set by the user on the command line with 'pwd'.  They
also override the 'core.worktree' setting, if it is used.

So without this change, the following fails:

  $ GIT_DIR=<dir> GIT_WORK_TREE=<dir> git difftool -d

Would the following change be better?

-     my $cmd = "git diff --raw --no-abbrev -z " . join(" ", @ARGV);
+     my $cmd = "git diff --raw --no-abbrev -z @ARGV";

  reply	other threads:[~2012-04-12 19:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 13:18 Tim Henigan
2012-04-12 18:27 ` Junio C Hamano
2012-04-12 19:10   ` Tim Henigan [this message]
2012-04-12 19:31     ` Junio C Hamano
2012-04-13  2:53       ` David Aguilar
2012-04-13 16:31         ` 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=CAFouetg6Ot8sKiNi45A0QRv6YYdL3Mwrb3tkVkajQQuZukSp3g@mail.gmail.com \
    --to=tim.henigan@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    --subject='Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs' \
    /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

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.