Re: [PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks

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

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

> Am 3/24/2013 16:15, schrieb John Keeping:
> ...
>> +	for my $file (keys %worktree) {
>>  		next if $symlinks && -l "$b/$file";
>>  		next if ! -f "$b/$file";
>>  
>> -		my $diff = compare("$b/$file", "$workdir/$file");
>> -		if ($diff == 0) {
>> -			next;
>> -		} elsif ($diff == -1) {
>> -			my $errmsg = "warning: Could not compare ";
>> -			$errmsg += "'$b/$file' with '$workdir/$file'\n";
>> +		my $wt_hash = $repo->command_oneline('hash-object',
>> +			"$workdir/$file");
>> +		my $tmp_hash = $repo->command_oneline('hash-object',
>> +			"$b/$file");
>
> This is gross. Can't we do much better here? Difftool already keeps a
> GIT_INDEX of the files in the temporary tree ($tmpdir/rindex). Running
> git-diff-files should be sufficient to tell which ones where edited via
> the users's diff-tool. Then you can restrict calling hash-object to only
> those worktree files where an "edit collision" needs to be checked for.

;-).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]