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

Re: [PATCH] doc: fix the max number of git show-branches shown

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2024, 18:21 UTC
Message-ID
<xmqqplrqpeio.fsf@gitster.g>
In-Reply-To
<20240706062701.GC700645@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> It looks like this is computed at build-time based on FLAG_BITS:
>
>   #define REV_SHIFT        2
>   #define MAX_REVS        (FLAG_BITS - REV_SHIFT) /* should not exceed bits_per_int - REV_SHIFT */
>
> That's defined in object.h. Looking at "git log -GFLAG_BITS object.h",
> it seems it was 27, then 29, and now 28. So I'm not sure how it was ever
> 29, but 26 makes sense now.

Originally it was bits-per-word minus REV_SHIFT -- back then we didn't even have FLAG_BITS.

Show 5 quoted lines
> It is unfortunate that it _could_ change again without us realizing the
> documentation is now stale. But I don't think it's something we'd touch
> very often, so this is probably OK in practice (and as the TODO above
> those lines says, ultimately this should use a commit-slab to handle an
> arbitrary number of refs).

Yup, I was hoping I can craft a response that tricks somebody (preferrably those who are not too experienced, as it should be too easy for some of the experienced ones) into tackling that TODO item, but you responded before I did ;-).

Show 6 quoted lines
>> Signed-off-by: wonda-tea-coffee <lagrange.resolvent@gmail.com>
>
> We generally want a real name here, since this is certifying that you
> agree to the DCO. See:
>
>   https://git-scm.com/docs/SubmittingPatches#sign-off

Another rule is that the name used to sign-off and the name of the author of the patch on "From: " line must match.

Thanks. I was getting tired of the only person to point it out to new contributors.

Previous: Jeff KingNext: wonda-tea-coffee via GitGitGadget
Message 3 of 12 in “doc: fix the max number of git show-branches shown”
  1. doc: fix the max number of git show-branches shownwonda-tea-coffee via GitGitGadget, Jul 3, 2024
  2. Jeff KingJul 6, 2024
  3. Junio C HamanoJul 6, 2024
  4. doc: fix the max number of git show-branches shownwonda-tea-coffee via GitGitGadget, Jul 6, 2024
  5. Jeff KingJul 6, 2024
  6. doc: fix the max number of git show-branches shownRikita Ishikawa via GitGitGadget, Jul 7, 2024
  7. doc: fix the max number of git show-branches shownRikita Ishikawa via GitGitGadget, Jul 7, 2024
  8. rikita ishikawaJul 7, 2024
  9. Jeff KingJul 8, 2024
  10. rikita ishikawaJul 8, 2024
  11. doc: fix the max number of git show-branches shownRikita Ishikawa via GitGitGadget, Jul 8, 2024
  12. Junio C HamanoJul 8, 2024

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.