From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] log: add --show-linear-break to help see non-linear history
Date: Fri, 21 Mar 2014 08:02:30 +0700 [thread overview]
Message-ID: <CACsJy8A1XZm1FanJ-QufOHsX44daVSEJA=g7VnA0bYS6uMzNVQ@mail.gmail.com> (raw)
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:
>> * 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
next prev parent reply other threads:[~2014-03-21 1:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 14:02 Confusing git log --- First time bug submission please advise on best practices Francis Stephens
2014-02-06 16:08 ` Vincent van Ravesteijn
2014-02-06 16:10 ` David Kastrup
2014-02-07 9:43 ` Francis Stephens
2014-02-07 10:26 ` Duy Nguyen
2014-02-07 11:37 ` demerphq
2014-02-08 13:50 ` [PATCH] log: add --show-linear-break to help see non-linear history Nguyễn Thái Ngọc Duy
2014-03-17 12:51 ` [PATCH v2] log: add --nonlinear-barrier " Nguyễn Thái Ngọc Duy
2014-03-17 19:09 ` Eric Sunshine
2014-03-17 20:32 ` Junio C Hamano
2014-03-18 11:46 ` Duy Nguyen
2014-03-18 19:08 ` Junio C Hamano
2014-03-20 5:44 ` [PATCH v3 1/2] object.h: centralize object flag allocation Nguyễn Thái Ngọc Duy
2014-03-20 5:44 ` [PATCH v3 2/2] log: add --show-linear-break to help see non-linear history Nguyễn Thái Ngọc Duy
2014-03-20 19:15 ` Junio C Hamano
2014-03-21 1:02 ` Duy Nguyen [this message]
2014-03-25 13:23 ` [PATCH v4 1/2] object.h: centralize object flag allocation Nguyễn Thái Ngọc Duy
2014-03-25 13:23 ` [PATCH v4 2/2] log: add --show-linear-break to help see non-linear history Nguyễn Thái Ngọc Duy
2014-03-25 22:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACsJy8A1XZm1FanJ-QufOHsX44daVSEJA=g7VnA0bYS6uMzNVQ@mail.gmail.com' \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).