Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Daniel Scherzer via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Daniel Scherzer <daniel.e.scherzer@gmail.com>
Subject: Re: [PATCH] reftable: document first ref block start for version 2 headers
Date: Fri, 4 Dec 2026 15:39:38 +0100	[thread overview]
Message-ID: <axLQqkSn0BE19bWq@pks.im> (raw)
In-Reply-To: <pull.2507.git.git.1795482172751.gitgitgadget@gmail.com>

On Tue, Nov 24, 2026 at 01:02:52AM +0000, Daniel Scherzer via GitGitGadget wrote:
> From: Daniel Scherzer <daniel.e.scherzer@gmail.com>
> 
> The existing documentation assumed that headers were always 24 bytes, which
> is no longer the case following the introduction of version 2 headers,
> which are 28 bytes. Update the "First ref block" section of the reftable
> documentation to indicate that the offset for the start of the first ref
> block depends on the version of the file header.

Yeah, indeed.

> diff --git a/Documentation/technical/reftable.adoc b/Documentation/technical/reftable.adoc
> index dd0b37c4e3..b277c4afe2 100644
> --- a/Documentation/technical/reftable.adoc
> +++ b/Documentation/technical/reftable.adoc
> @@ -256,11 +256,12 @@ First ref block
>  ^^^^^^^^^^^^^^^
>  
>  The first ref block shares the same block as the file header, and is 24
> -bytes smaller than all other blocks in the file. The first block
> -immediately begins after the file header, at position 24.
> +bytes smaller than all other blocks in the file for version 1 headers, and
> +28 bytes smaller than all other blocks in the file for version 2 headers.
> +The first block immediately begins after the file header, at position 24 or 28.
>  
>  If the first block is a log block (a log-only file), its block header
> -begins immediately at position 24.
> +begins immediately at position 24 or 28.

Yup. We already document the two different header versions a couple
lines before this hunk. For those wondering: the additional four bytes
are used for the hash ID, which is "sha1" or "s256", respectively.

In any case, the changes look good to me, thanks!

Patrick

      reply	other threads:[~2026-12-04 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  1:02 [PATCH] reftable: document first ref block start for version 2 headers Daniel Scherzer via GitGitGadget
2026-12-04 14:39 ` Patrick Steinhardt [this message]

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=axLQqkSn0BE19bWq@pks.im \
    --to=ps@pks.im \
    --cc=daniel.e.scherzer@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@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