pack-format.txt: more details on pack file format

The current document mentions OBJ_* constants without their actual
values. A git developer would know these are from cache.h but that's
not very friendly to a person who wants to read this file to implement
a pack file parser.

Similarly, the deltified representation is not documented at all (the
"document" is basically patch-delta.c). Translate that C code to
English with a bit more about what ofs-delta and ref-delta mean.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-05-11 08:55:23 +02:00
committed by Junio C Hamano
parent 468165c1d8
commit 011b648646
2 changed files with 97 additions and 0 deletions

View File

@ -373,6 +373,11 @@ extern void free_name_hash(struct index_state *istate);
#define read_blob_data_from_cache(path, sz) read_blob_data_from_index(&the_index, (path), (sz))
#endif
/*
* Values in this enum (except those outside the 3 bit range) are part
* of pack file format. See Documentation/technical/pack-format.txt
* for more information.
*/
enum object_type {
OBJ_BAD = -1,
OBJ_NONE = 0,