Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Thu, Apr 12, 2012 at 12:31 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Tim Henigan <tim.henigan@xxxxxxxxx> writes:
>> 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";
> They look exactly the same to me.

The issue is that this does not properly handle shell characters, IFS, etc.

I think a simple solution would be to use git diff --exit-code --quiet here.


    my $rc = system('git', 'diff', '--exit-code', '--quiet', @ARGV);

That avoids the shell and properly handles shell meta-characters, IFS, etc.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Newbies FAQ]     [Linux Kernel Development]     [Free Online Dating]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Free Online Dating]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]     [Linux Resources]

Add to Google