From: David Aguilar Date: Sat, 21 Apr 2012 23:07:36 GMT Subject: Re: [PATCH v14 8/9] difftool: teach difftool to handle directory diffs Message-ID: In-Reply-To: <1334940988-8940-1-git-send-email-tim.henigan@gmail.com> On Fri, Apr 20, 2012 at 9:56 AM, Tim Henigan wrote: > [snip] > + > +sub setup_dir_diff > +{ > +       # Run the diff; exit immediately if no diff found > +       # 'Repository' and 'WorkingCopy' must be explicitly set to insure that > +       # if $GIT_DIR and $GIT_WORK_TREE are set in ENV, they are actually used > +       # by Git->repository->command*. > +       my $diffrepo = Git->repository(Repository => $repo_path, WorkingCopy => $workdir); > +       my $diffrtn = $diffrepo->command_oneline('diff', '--raw', '--no-abbrev', '-z', @ARGV); > +       exit(0) if (length($diffrtn) == 0); > + > +       if ($diffrtn =~ /::/) { > +               print "Combined diff formats ('-c' and '--cc') are not supported in directory diff mode.\n"; > +               exit(1); > +       } > + > +       # Setup temp directories > +       my $tmpdir = tempdir('git-diffall.XXXXX', CLEANUP => 1, TMPDIR => 1); > +       my $ldir = "$tmpdir/left"; > +       my $rdir = "$tmpdir/right"; > +       mkpath($ldir) or die $!; > +       mkpath($rdir) or die $!; > + > +       # Build index info for left and right sides of the diff > +       my $submodule_mode = "160000"; > +       my $symlink_mode = "120000"; > +       my $null_mode = "0" x 6; > +       my $null_sha1 = "0" x 40; > +       my $lindex = ""; > +       my $rindex = ""; Super super tiny nit.... When reading Perl I expect to see DQ used only when $variable interpolation is used. Can we use ' instead of " for these strings in the re-roll to address Junio's notes? -- David