Re: [PATCH 2/9] gitweb: Separate ref parsing in git_get_refs_list into parse_ref

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

 



Junio C Hamano wrote:

> Jakub Narebski <jnareb@xxxxxxxxx> writes:
> 
>> Note that for each ref there are usually two calls to git subroutines:
>> first to get the type of ref, second to parse ref if ref is of commit
>> or tag type.

[...]  
>> +# parse ref from ref_file, given by ref_id, with given type
>> +sub parse_ref {
>> +    my $ref_file = shift;
>> +    my $ref_id = shift;
>> +    my $type = shift || git_get_type($ref_id);
> 
> This git_get_type() is additional from the original.
> Future-proofing yourself for other new callers?

Yes, just in case.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


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