Johannes Sixt <j.s...@viscovery.net> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to