git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>, git@vger.kernel.org
Subject: Re: [PATCH] pack-format: correct multi-pack-index description
Date: Mon, 10 Feb 2020 09:18:34 -0500	[thread overview]
Message-ID: <8d50143b-adb9-c642-5ca6-d51662c37dda@gmail.com> (raw)
In-Reply-To: <20200207221640.46876-1-johannes@sipsolutions.net>

On 2/7/2020 5:16 PM, Johannes Berg wrote:
> The description of the multi-pack-index contains a small bug,
> if all offsets are < 2^32 then there will be no LOFF chunk,
> not only if they're all < 2^31 (since the highest bit is only
> needed as the "LOFF-escape" when that's actually needed.)
> 
> Correct this, and clarify that in that case only offsets up
> to 2^31-1 can be stored in the OOFF chunk.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>  Documentation/technical/pack-format.txt | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
> index cab5bdd2ff0f..d3a142c65202 100644
> --- a/Documentation/technical/pack-format.txt
> +++ b/Documentation/technical/pack-format.txt
> @@ -315,10 +315,11 @@ CHUNK DATA:
>  	    Stores two 4-byte values for every object.
>  	    1: The pack-int-id for the pack storing this object.
>  	    2: The offset within the pack.
> -		If all offsets are less than 2^31, then the large offset chunk
> +		If all offsets are less than 2^32, then the large offset chunk
>  		will not exist and offsets are stored as in IDX v1.
>  		If there is at least one offset value larger than 2^32-1, then
> -		the large offset chunk must exist. If the large offset chunk
> +		the large offset chunk must exist, and offsets larger than
> +		2^31-1 must be stored in it instead. If the large offset chunk
>  		exists and the 31st bit is on, then removing that bit reveals
>  		the row in the large offsets containing the 8-byte offset of
>  		this object.

Thank you for finding this doc bug. This is a very subtle point,
and you have described it very clearly.

-Stolee


  reply	other threads:[~2020-02-10 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 22:16 [PATCH] pack-format: correct multi-pack-index description Johannes Berg
2020-02-10 14:18 ` Derrick Stolee [this message]
2020-02-10 14:22   ` Johannes Berg
2020-02-10 14:46     ` Derrick Stolee
2020-02-10 14:50       ` Johannes Berg
2020-02-10 15:02         ` Derrick Stolee
2020-02-10 15:06           ` Johannes Berg
2020-02-10 17:02   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d50143b-adb9-c642-5ca6-d51662c37dda@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).