Thread (1 message) 1 message, 1 author, 2017-08-16

Re: [PATCH 2/5] sha1_file: fix hardcoded size in null_sha1

From: Junio C Hamano <hidden>
Date: 2017-08-16 19:32:36

Patryk Obara [off-list ref] writes:
Junio C Hamano [off-list ref] wrote:
quoted
I said this is OK for "null" because we assume we will use ^\0{len}$
for any hash function we choose as the "impossible" value, and for
that particular use pattern, we do not need such a union.  Just
letting the caller peek at an appropriate number of bytes at the
beginning of that NUL buffer for hash the caller wants to use is
sufficient.
Do you think I should record this explanation as either commit message
or comment in sha1_file.c?
quoted
MAX is inevitable only if we envision that we have to handle objects
named using two or more hashing schemes at the same time, with the
same binary and during the same run inside a single process.
I think this will be the case if "transition one local repository at
a time" from Jonathan Nieder's transition plan will be followed.
This plan assumes object_id translation happening e.g. during fetch
operation.
It would be good if that assumption is made explicit.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help