diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-11-19 23:23:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 23:23:42 +0100 |
commit | f62cd8e3495579a8323455fa0c4e6c44bb0d5e09 (patch) | |
tree | 22c4649f1e93076d96a263cdd876cb8a7e16694c /plumbing/format/index/doc.go | |
parent | 2431109797aa48f33c0be2066c58f0cad0578ecc (diff) | |
parent | b99653a9d3d231a9e1e4a1ddca41a08b3b733ae9 (diff) | |
download | go-git-f62cd8e3495579a8323455fa0c4e6c44bb0d5e09.tar.gz |
Merge pull request #1025 from mcuadros/eoiev4.8.0
plumbing: format/index: support for EOIE extension
Diffstat (limited to 'plumbing/format/index/doc.go')
-rw-r--r-- | plumbing/format/index/doc.go | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/plumbing/format/index/doc.go b/plumbing/format/index/doc.go index d1e7b33..f2b3d76 100644 --- a/plumbing/format/index/doc.go +++ b/plumbing/format/index/doc.go @@ -297,5 +297,64 @@ // in the previous ewah bitmap. // // - One NUL. -// Source https://www.kernel.org/pub/software/scm/git/docs/technical/index-format.txt +// +// == File System Monitor cache +// +// The file system monitor cache tracks files for which the core.fsmonitor +// hook has told us about changes. The signature for this extension is +// { 'F', 'S', 'M', 'N' }. +// +// The extension starts with +// +// - 32-bit version number: the current supported version is 1. +// +// - 64-bit time: the extension data reflects all changes through the given +// time which is stored as the nanoseconds elapsed since midnight, +// January 1, 1970. +// +// - 32-bit bitmap size: the size of the CE_FSMONITOR_VALID bitmap. +// +// - An ewah bitmap, the n-th bit indicates whether the n-th index entry +// is not CE_FSMONITOR_VALID. +// +// == End of Index Entry +// +// The End of Index Entry (EOIE) is used to locate the end of the variable +// length index entries and the begining of the extensions. Code can take +// advantage of this to quickly locate the index extensions without having +// to parse through all of the index entries. +// +// Because it must be able to be loaded before the variable length cache +// entries and other index extensions, this extension must be written last. +// The signature for this extension is { 'E', 'O', 'I', 'E' }. +// +// The extension consists of: +// +// - 32-bit offset to the end of the index entries +// +// - 160-bit SHA-1 over the extension types and their sizes (but not +// their contents). E.g. if we have "TREE" extension that is N-bytes +// long, "REUC" extension that is M-bytes long, followed by "EOIE", +// then the hash would be: +// +// SHA-1("TREE" + <binary representation of N> + +// "REUC" + <binary representation of M>) +// +// == Index Entry Offset Table +// +// The Index Entry Offset Table (IEOT) is used to help address the CPU +// cost of loading the index by enabling multi-threading the process of +// converting cache entries from the on-disk format to the in-memory format. +// The signature for this extension is { 'I', 'E', 'O', 'T' }. +// +// The extension consists of: +// +// - 32-bit version (currently 1) +// +// - A number of index offset entries each consisting of: +// +// - 32-bit offset from the begining of the file to the first cache entry +// in this block of entries. +// +// - 32-bit count of cache entries in this blockpackage index package index |