Re: [PATCH v8 03/14] commit-graph: add format document
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Apr 11, 2018, 20:58 UTC
- Message-ID
- <86zi294fzq.fsf@gmail.com>
- In-Reply-To
- <20180410125608.39443-4-dstolee@microsoft.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 11 quoted lines
> +CHUNK DATA:
> +
> + OID Fanout (ID: {'O', 'I', 'D', 'F'}) (256 * 4 bytes)
> + The ith entry, F[i], stores the number of OIDs with first
> + byte at most i. Thus F[255] stores the total
> + number of commits (N).
> +
> + OID Lookup (ID: {'O', 'I', 'D', 'L'}) (N * H bytes)
> + The OIDs for all commits in the graph, sorted in ascending order.
> +
> + Commit Data (ID: {'C', 'G', 'E', 'T' }) (N * (H + 16) bytes)I think it is a typo, and it should be CDAT, not CGET (CDAT seem to me to stand for Commit DATa):
+ Commit Data (ID: {'C', 'D', 'A', 'T' }) (N * (H + 16) bytes)This is what you use in actual implementation, in PATCH v8 06/14
DS> +#define GRAPH_SIGNATURE 0x43475048 /* "CGPH" */ DS> +#define GRAPH_CHUNKID_OIDFANOUT 0x4f494446 /* "OIDF" */ DS> +#define GRAPH_CHUNKID_OIDLOOKUP 0x4f49444c /* "OIDL" */ DS> +#define GRAPH_CHUNKID_DATA 0x43444154 /* "CDAT" */ DS> +#define GRAPH_CHUNKID_LARGEEDGES 0x45444745 /* "EDGE" */
-- Jakub Narębski