From: Tim Henigan Date: Thu, 12 Apr 2012 19:10:45 GMT Subject: Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs Message-ID: In-Reply-To: <7viph46c1t.fsf@alter.siamese.dyndns.org> On Thu, Apr 12, 2012 at 2:27 PM, Junio C Hamano wrote: > Tim Henigan 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= GIT_WORK_TREE= 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";