Re: [PATCH] Define constants for lengths of object names

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

 



Jonathan Nieder wrote:
> brian m. carlson wrote:

>> --- a/object.h
>> +++ b/object.h
> [...]
>> @@ -49,7 +56,7 @@ struct object {
>>  	unsigned used : 1;
>>  	unsigned type : TYPE_BITS;
>>  	unsigned flags : FLAG_BITS;
>> -	unsigned char sha1[20];
>> +	unsigned char sha1[GIT_OID_RAWSZ];
>
> Maybe my brain has been damaged by reading code from too many C
> projects that hard-code some constants, but I find '20' easier to read
> here.

That said, RAW_SHA1_BYTES would sound okay to me.

Part of the problem was how long it takes to mentally parse oid_rawsz.

Thanks,
Jonathan
--
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]