Re: [PATCH 2/3] difftool: chdir as early as possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Aguilar <davvid@xxxxxxxxx> 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);
>  		}
>  	}



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]