From: Duy Nguyen Date: Fri, 25 Oct 2013 01:16:18 GMT Subject: Re: [PATCH 09/19] documentation: add documentation for the bitmap format Message-ID: In-Reply-To: <20131024180347.GI24180@sigill.intra.peff.net> On Fri, Oct 25, 2013 at 1:03 AM, Jeff King wrote: > diff --git a/Documentation/technical/bitmap-format.txt b/Documentation/technical/bitmap-format.txt > new file mode 100644 > index 0000000..c686dd1 > --- /dev/null > +++ b/Documentation/technical/bitmap-format.txt > @@ -0,0 +1,131 @@ > +GIT bitmap v1 format > +==================== > + > + - A header appears at the beginning: > + > + 4-byte signature: {'B', 'I', 'T', 'M'} > + > + 2-byte version number (network byte order) > + The current implementation only supports version 1 > + of the bitmap index (the same one as JGit). I suppose this means if I want to extend pack bitmaps to be used on shallow clones, I need to step version to 2 before adding the shallow points in .bitmap file as there's no chance of modifying v1 anymore, correct? > + > + 2-byte flags (network byte order) > + > + The following flags are supported: > + > + - BITMAP_OPT_FULL_DAG (0x1) REQUIRED > + This flag must always be present. It implies that the bitmap > + index has been generated for a packfile with full closure > + (i.e. where every single object in the packfile can find > + its parent links inside the same packfile). This is a > + requirement for the bitmap index format, also present in JGit, > + that greatly reduces the complexity of the implementation. > + > + 4-byte entry count (network byte order) > + > + The total count of entries (bitmapped commits) in this bitmap index. > + > + 20-byte checksum > + > + The SHA1 checksum of the pack this bitmap index belongs to. > + -- Duy