Re: [PATCH v3 2/2] log: add --show-linear-break to help see non-linear history
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 21, 2014, 01:02 UTC
- Message-ID
- <CACsJy8A1XZm1FanJ-QufOHsX44daVSEJA=g7VnA0bYS6uMzNVQ@mail.gmail.com>
- In-Reply-To
- <xmqqha6sy955.fsf@gitster.dls.corp.google.com>
On Fri, Mar 21, 2014 at 2:15 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
>> * Get rid of saved_linear, use another flag in struct object instead > > I cannot offhand say if I like this change or not. A flag bit is a > scarce and limited resource; commit slabs felt more suited for > implementation of corner case eye-candies.
My thinking was like this:
OK an int for a flag is wasteful and Junio suggested that unsigned char is used. But that still wastes 7 bits. So what if I rename it to commit_flags and make it usable as a flag storage for other parts as well? Wait don't we have some flags in struct object#flags. It turns out we have _7_ flags left that nobody touches. Let's take one. If we run out of flags in future, we can bring back commit_flags slab, rearrange the flags and move rarely used ones to commit_flags.
-- Duy