git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] diff.h: extend "flags" field to 64 bits because we're out of bits

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 7, 2016, 00:40 UTC
Message-ID
<CACsJy8AVzWBsDhzj+UJo9AbSi0f=jrAyrLZ9sU=VBP3woFXr0A@mail.gmail.com>
In-Reply-To
<xmqqfusqw17r.fsf@gitster.mtv.corp.google.com>
On Tue, Jun 7, 2016 at 2:45 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> Current flags field is 32-bits, all used except one bit and we need one
>> more bit is needed for to toggle i-t-a behavior. The 9th bit could be
>> reused for this, but we could just extend it to 64 bits now to give room
>> for more future flags.
>
> Isn't it a better option to add new things as separate words (or a
> separate bit:1 field)?  Is this 32nd thing envisioned to be added
> going to be used everywhere like the existing flag bits, or can it
> be handled like "use_color", "break_opt", "show_rename_progress"?

It could probably live as a separate bitfield, or an int. What scares me is "flags" sometimes is backed up then restored, but it's probably ok. But we need to extend this "flags" eventually, don't we? I don't think people will stop adding new DIFF_OPT_ flags.

-- 
Duy
Previous: Junio C HamanoNext: stefan.naewe@atlas-elektronik.com
Message 4 of 15 in “i-t-a entries again...”
  1. 0/4 i-t-a entries again...Nguyễn Thái Ngọc Duy, Jun 6, 2016
  2. 1/4 diff.h: extend "flags" field to 64 bits because we're out of bitsNguyễn Thái Ngọc Duy, Jun 6, 2016
  3. Junio C HamanoJun 6, 2016
  4. Duy NguyenJun 7, 2016
  5. stefan.naewe@atlas-elektronik.comJun 7, 2016
  6. 2/4 Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"Nguyễn Thái Ngọc Duy, Jun 6, 2016
  7. Junio C HamanoJun 6, 2016
  8. Duy NguyenJun 7, 2016
  9. Johannes SchindelinJun 9, 2016
  10. Duy NguyenSep 27, 2016
  11. Duy NguyenSep 27, 2016
  12. 3/4 commit: don't count i-t-a entries when checking if the new commit is emptyNguyễn Thái Ngọc Duy, Jun 6, 2016
  13. Junio C HamanoJun 6, 2016
  14. Junio C HamanoJun 6, 2016
  15. 4/4 commit: reinstate commit behavior before 3f6d56d via a config optionNguyễn Thái Ngọc Duy, Jun 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.