Re: [PATCH 5/5] commit: rewrite read_graft_line
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 15, 2017, 18:30 UTC
- Message-ID
- <xmqqo9rgr8eh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <ee8edaf08864d5983ff1a5150077d29a4ee17796.1502796628.git.patryk.obara@gmail.com>
Patryk Obara <patryk.obara@gmail.com> writes:
> The previous implementation of read_graft_line used calculations based > on GIT_SHA1_RAWSZ and GIT_SHA1_HEXSZ to determine the number of commit > ids in a single graft line. New implementation does not depend on these > constants, so it adapts to any object_id buffer size.
I am not sure if this is a good approach. Just like in 2/5 you can use the MAX thing instead of 20, instead of having each graft entry allocate a separate oid_array.oid[].
Is this because you expect more than one _kind_ of hashes are used at the same time?