Subject: Re: [PATCH 1/2] gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line

From: Jakub Narebski <[email-masked]>
Date: Fri, 2 Nov 2007 00:46:25 +0100

Junio C Hamano wrote:
> Jakub Narebski <[email-masked]> writes:
> 
>> Always set 'from_file' and 'to_file' keys when parsing raw diff output
>> format line, even if filename didn't change (file was not renamed).
>> This allows for simpler code (and no problems with file named '0').
>>
>> Use
>>   $diffinfo->{'from_file'}
>> instead of
>>   $diffinfo->{'from_file'} || $diffinfo->{'file'}
>> from now on.
> 
> Isn't this description the other way around?

Description is in good direction, although I agree that it is
a bit awkward. Perhaps it should read:

Instead of
  $diffinfo->{'from_file'} || $diffinfo->{'file'}
it is now enough to use
  $diffinfo->{'from_file'}

(because $diffinfo->{'from_file'} is now _always_ set, not only for
renames and copies, when from_name and to_name differ).

-- 
Jakub Narebski
Poland