Re: [PATCH v2 09/14] bisect.c: use commit-slab for commit weight instead of commit->util
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 14, 2018, 06:16 UTC
- Message-ID
- <xmqq7eo6daov.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180513055208.17952-10-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> - p->item->util = &weights[n++]; > + *commit_weight_at(&commit_weight, p->item) = &weights[n++];
Interesting to see that this cleverness was inherited from the original code that used the util field :-). I was wondering why the code was using "int*" without on-demand allocation.