Patryk Obara <patryk.obara@xxxxxxxxx> writes: > Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> 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? > >> 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.