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. e.g. my $rc = system('git', 'diff', '--exit-code', '--quiet', @ARGV); That avoids the shell and properly handles shell meta-characters, IFS, etc. -- David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html