Re: [PATCH v3 3/4] t7800: modernize tests
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Mar 21, 2013, 07:41 UTC
- Message-ID
- <514AB9A5.3050601@viscovery.net>
- In-Reply-To
- <CAJDDKr4O-OU57j0f7F2E2_4EvtCTE1gFP5uLv+fvD6VcpPiifg@mail.gmail.com>
Am 3/20/2013 23:59, schrieb David Aguilar:
Show 15 quoted lines
> I started digging in and the @worktree_files (aka @worktree above) > is populated from the output of "git diff --raw ...". > > Seeing the "output" filename in "diff --raw" implies that one of the > tests added "output" to the index somehow. I do not see that > happening anywhere, though, so I do not know how it would end up in > the @worktree array if it is not reported by "diff --raw". > > > My current understanding of how it could possibly be open twice: > > 1. via the >output redirect > 2. via the copy() perl code which is fed by @worktree > > So I'm confused. Why would we get different results on Windows?
I tracked down the difference between Windows and Linux, and it is...
for my $file (@worktree) {
next if $symlinks && -l "$b/$file";... this line in sub dir_diff. On Linux, we take the short-cut, but on Windows we proceed through the rest of the loop, which ultimately finds a difference here:
my $diff = compare("$b/$file", "$workdir/$file");and attempts to copy a file here:
copy("$b/$file", "$workdir/$file") orwhere one of the files is the locked "output" file.
I don't know how essential symlinks are for the operation of git-difftool and whether something can be done about it. The immediate fix is apparently to protect the tests with SYMLINKS.
-- Hannes