From: Junio C Hamano <gitster@pobox•com>
To: David Aguilar <davvid@gmail•com>
Cc: Git ML <git@vger•kernel.org>
Subject: Re: [PATCH 2/3] difftool: chdir as early as possible
Date: Fri, 09 Dec 2016 15:02:09 -0800 [thread overview]
Message-ID: <xmqqbmwkr9ji.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161209085848.10929-2-davvid@gmail.com> (David Aguilar's message of "Fri, 9 Dec 2016 00:58:47 -0800")
David Aguilar <davvid@gmail•com> writes:
> @@ -182,10 +188,6 @@ EOF
> }
> }
>
> - # Go to the root of the worktree so that the left index files
> - # are properly setup -- the index is toplevel-relative.
> - chdir($workdir);
> -
> # Setup temp directories
> my $tmpdir = tempdir('git-difftool.XXXXX', CLEANUP => 0, TMPDIR => 1);
> my $ldir = "$tmpdir/left";
What codebase are you basing your work on? I do not see these
removed four lines in my tree, so it seems that the patch is fixing
up some other fix I do not yet have.
> @@ -235,10 +237,10 @@ EOF
> symlink("$workdir/$file", "$rdir/$file") or
> exit_cleanup($tmpdir, 1);
> } else {
> - copy("$workdir/$file", "$rdir/$file") or
> + copy($file, "$rdir/$file") or
> exit_cleanup($tmpdir, 1);
>
> - my $mode = stat("$workdir/$file")->mode;
> + my $mode = stat($file)->mode;
> chmod($mode, "$rdir/$file") or
> exit_cleanup($tmpdir, 1);
> }
> @@ -430,10 +432,10 @@ sub dir_diff
> $error = 1;
> } elsif (exists $tmp_modified{$file}) {
> my $mode = stat("$b/$file")->mode;
> - copy("$b/$file", "$workdir/$file") or
> + copy("$b/$file", $file) or
> exit_cleanup($tmpdir, 1);
>
> - chmod($mode, "$workdir/$file") or
> + chmod($mode, $file) or
> exit_cleanup($tmpdir, 1);
> }
> }
next prev parent reply other threads:[~2016-12-09 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 8:58 [PATCH 1/3] difftool: sanitize $workdir as early as possible David Aguilar
2016-12-09 8:58 ` [PATCH 2/3] difftool: chdir " David Aguilar
2016-12-09 23:02 ` Junio C Hamano [this message]
2016-12-10 0:03 ` David Aguilar
2016-12-09 8:58 ` [PATCH 3/3] difftool: rename variables for consistency David Aguilar
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=xmqqbmwkr9ji.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=davvid@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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