diff mbox series

[v2,3/3] bitmap-format.txt: add information for trailing checksum

Message ID 2171d31fb2b783371bdc31ba54856dea8224de65.1654623814.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series bitmap-format.txt: fix some formatting issues and include checksum info | expand

Commit Message

Abhradeep Chakraborty June 7, 2022, 5:43 p.m. UTC
From: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>

Bitmap file has a trailing checksum at the end of the file. However
there is no information in the bitmap-format documentation about it.

Add a trailer section to include the trailing checksum info in the
`Documentation/technical/bitmap-format.txt` file.

Signed-off-by: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
---
 Documentation/technical/bitmap-format.txt | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Taylor Blau June 7, 2022, 8:56 p.m. UTC | #1
On Tue, Jun 07, 2022 at 05:43:34PM +0000, Abhradeep Chakraborty via GitGitGadget wrote:
> From: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
>
> Bitmap file has a trailing checksum at the end of the file. However
> there is no information in the bitmap-format documentation about it.
>
> Add a trailer section to include the trailing checksum info in the
> `Documentation/technical/bitmap-format.txt` file.
>
> Signed-off-by: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
> ---
>  Documentation/technical/bitmap-format.txt | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/technical/bitmap-format.txt b/Documentation/technical/bitmap-format.txt
> index f22669b5916..a43d2fe2bbf 100644
> --- a/Documentation/technical/bitmap-format.txt
> +++ b/Documentation/technical/bitmap-format.txt
> @@ -125,6 +125,10 @@ MIDXs, both the bit-cache and rev-cache extensions are required.
>
>  		** The compressed bitmap itself, see Appendix A.
>
> +	* TRAILER:
> +
> +		Index checksum of the above contents. It is a 20-byte SHA1 checksum.
> +

I assume by "Index checksum" you are referring to a checksum of the
bitmap _index_'s contents. That term is used a little throughout
pack-format.txt, but it's foreign to me. Assuming that's how you meant
it, a more conventional term (I think) would be just "trailing
checksum".

It is also not guaranteed to be a SHA-1 checksum, if the repository
which wrote the bitmap is in SHA-256 mode. So I would suggest that this
addition just read:

    * TRAILER:

      Trailing checksum of the preceding contents.

Thanks,
Taylor
Abhradeep Chakraborty June 8, 2022, 4:15 p.m. UTC | #2
Taylor Blau <me@ttaylorr.com> wrote:

> I assume by "Index checksum" you are referring to a checksum of the
> bitmap _index_'s contents. 

Yeah, I meant a checksum of the bitmap file's content.

> That term is used a little throughout
> pack-format.txt, but it's foreign to me. Assuming that's how you meant
> it, a more conventional term (I think) would be just "trailing
> checksum".

Actually, I copy-paste it from the pack-format.txt file ;). Will surely
follow your suggestions.

> It is also not guaranteed to be a SHA-1 checksum, if the repository
> which wrote the bitmap is in SHA-256 mode. So I would suggest that this
> addition just read:
>
>     * TRAILER:
>
>       Trailing checksum of the preceding contents.

Got it. Thanks !
diff mbox series

Patch

diff --git a/Documentation/technical/bitmap-format.txt b/Documentation/technical/bitmap-format.txt
index f22669b5916..a43d2fe2bbf 100644
--- a/Documentation/technical/bitmap-format.txt
+++ b/Documentation/technical/bitmap-format.txt
@@ -125,6 +125,10 @@  MIDXs, both the bit-cache and rev-cache extensions are required.
 
 		** The compressed bitmap itself, see Appendix A.
 
+	* TRAILER:
+
+		Index checksum of the above contents. It is a 20-byte SHA1 checksum.
+
 == Appendix A: Serialization format for an EWAH bitmap
 
 Ewah bitmaps are serialized in the same protocol as the JAVAEWAH