git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: wonda-tea-coffee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, wonda-tea-coffee <lagrange.resolvent@gmail.com>
Subject: Re: [PATCH] doc: fix the max number of git show-branches shown
Date: Sat, 6 Jul 2024 02:27:01 -0400	[thread overview]
Message-ID: <20240706062701.GC700645@coredump.intra.peff.net> (raw)
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

  reply	other threads:[~2024-07-06  6:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03 22:36 [PATCH] doc: fix the max number of git show-branches shown wonda-tea-coffee via GitGitGadget
2024-07-06  6:27 ` Jeff King [this message]
2024-07-06 18:21   ` Junio C Hamano
2024-07-06  9:53 ` [PATCH v2] " wonda-tea-coffee via GitGitGadget
2024-07-06 23:14   ` Jeff King
2024-07-07  2:19   ` [PATCH v3] " Rikita Ishikawa via GitGitGadget
2024-07-07  2:28     ` [PATCH v4] " Rikita Ishikawa via GitGitGadget
2024-07-07  2:30       ` rikita ishikawa
2024-07-08  8:52       ` Jeff King
2024-07-08 13:01         ` rikita ishikawa
2024-07-08 13:07       ` [PATCH v5] " Rikita Ishikawa via GitGitGadget
2024-07-08 15:29         ` 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=20240706062701.GC700645@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=lagrange.resolvent@gmail.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).