On Tue, Mar 10, 2015 at 07:38:42PM -0700, Kyle J. McKay wrote:
GIT_SHA1_HEXSZ will always be exactly 2 * GIT_SHA1_RAWSZ, right? In fact, if it's not things will almost certainly break, yes? Does it make more sense then to reflect this requirement by using: #define GIT_SHA1_HEXSZ (2 * GIT_SHA1_RAWSZ) instead?
Yes. I'll make that change in the next version.
I don't see anything wrong with this. However, in part 02/10 the utility functions all use "oid" in their names, so I'm thinking that it may make more sense to just go with: struct object_id { unsigned char oid[GIT_SHA1_RAWSZ]; }; to match?
Michael Haggerty recommended that I call the structure element sha1 instead of oid in case we want to turn this into a union if we decide to go the additional hash route. I think it can also improve readability if we use "oid" only for the instances of the struct itself, especially since it makes it more obvious what code has been converted already. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Attachment:
signature.asc
Description: Digital signature