summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-11 06:55:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-13 01:20:03 (GMT)
commit011b648646fcf1f467336ac6bbf46145501c0f12 (patch)
treee5028919cb4f751528819036a86f9b1d72fa6b2a /cache.h
parent468165c1d8a442994a825f3684528361727cd8c0 (diff)
downloadgit-011b648646fcf1f467336ac6bbf46145501c0f12.zip
git-011b648646fcf1f467336ac6bbf46145501c0f12.tar.gz
git-011b648646fcf1f467336ac6bbf46145501c0f12.tar.bz2
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index a61b2d3..a3f82fa 100644
--- a/cache.h
+++ b/cache.h
@@ -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,