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
Jeff King <peff@peff.net>
Date
Jul 6, 2024, 06:27 UTC
Message-ID
<20240706062701.GC700645@coredump.intra.peff.net>
In-Reply-To
<pull.1757.git.1720046185710.gitgitgadget@gmail.com>
On Wed, Jul 03, 2024 at 10:36:25PM +0000, wonda-tea-coffee via GitGitGadget wrote:
> From: wonda-tea-coffee <lagrange.resolvent@gmail.com>
> 
> Contrary to the number listed in the current document,
> only 26 are actually shown.

The commit message would be a good place to explain how we know "26" is the right number. ;)

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.

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).

> 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
-Peff
Previous: wonda-tea-coffee via GitGitGadgetNext: Junio C Hamano
Message 2 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.