I try to split the whole directory with git-difftool
, and I get the following error:
$ git difftool -d
/usr/lib/git-core/git-difftool line 266: File exists
An alternative is to use the option --no-symlinks
, but that means that I cannot edit the files inside the diff (meld) tool.
$ git --version
git version 1.9.1
This is the part of the perl script responsible for the error:
256
257
258
259 $workdir =~ s|/$||;
260 for my $file (@working_tree) {
261 my $dir = dirname($file);
262 unless (-d "$rdir/$dir") {
263 mkpath("$rdir/$dir") or
264 exit_cleanup($tmpdir, 1);
265 }
266 if ($symlinks) {
267 symlink("$workdir/$file", "$rdir/$file") or
268 exit_cleanup($tmpdir, 1);
269 } else {
270 copy("$workdir/$file", "$rdir/$file") or
271 exit_cleanup($tmpdir, 1);
272
273 my $mode = stat("$workdir/$file")->mode;
274 chmod($mode, "$rdir/$file") or
275 exit_cleanup($tmpdir, 1);
276 }
277 }
I printed these variables and noticed that the files / directories where it is trying to create symbolic links do not exist.
source
share