git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Tim Henigan <tim.henigan@gmail.com>
Cc: gitster@pobox.com, git@vger.kernel.org, ramsay@ramsay1.demon.co.uk
Subject: Re: [PATCH v14 8/9] difftool: teach difftool to handle directory diffs
Date: Sat, 21 Apr 2012 16:07:36 -0700	[thread overview]
Message-ID: <CAJDDKr4AuTHX2LSFuw4g2fWsE3M+A2EcX9bXx6yDRebvAMx_1g@mail.gmail.com> (raw)
In-Reply-To: <1334940988-8940-1-git-send-email-tim.henigan@gmail.com>

On Fri, Apr 20, 2012 at 9:56 AM, Tim Henigan <tim.henigan@gmail.com> 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

      parent reply	other threads:[~2012-04-21 23:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 16:56 [PATCH v14 8/9] difftool: teach difftool to handle directory diffs Tim Henigan
2012-04-20 20:54 ` Junio C Hamano
2012-04-21 23:07 ` David Aguilar [this message]

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=CAJDDKr4AuTHX2LSFuw4g2fWsE3M+A2EcX9bXx6yDRebvAMx_1g@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    --cc=tim.henigan@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).