Re: Refactoring hardcoded SHA-1 constants

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

> On Sat, Apr 19, 2014 at 7:06 AM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote:
>> Let the brainstorming (and bikeshedding) begin!
>>
>> 1. GIT_OID_RAWSZ / GIT_OID_HEXSZ
>>
>> 2. OID_RAWSZ / OID_HEXSZ
>>
>> 3. OID_BINARY_LEN / OID_ASCII_LEN
>>
>> 4. BINARY_OID_LEN / ASCII_OID_LEN
>
> 5. sizeof(oid) / ASCII_OID_LEN

Can we safely assume sizeof(struct { uchar oid[20]; }) is 20, or on
some 64-bit platforms do we have to worry about 8-byte alignment?

In any case, if the pair of names in 1. are what is already used, I
do not see a need for us to waste time bikeshedding at all.

In an ideal world, an implementation of cmd_foo() that defines a
variable to hold an object name and then calls into libgit.a
services may link in the future with a different implementation of
the services that are currently offered by libgit.a but are
reimplemented on top of libgit2, right?  Having the same name would
help us, not hurt us, with that direction in some future, no?
--
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]