summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-03-30 13:10:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-30 19:57:46 (GMT)
commitcd42415fb4c9680f308ebf8f9f85ba90ae6014be (patch)
tree8937e603c8fc93ff887578f6053817c6148ae5c4 /Documentation/technical
parent836e25c51b20c1f1d122dc17a1c57dad15ff5854 (diff)
downloadgit-cd42415fb4c9680f308ebf8f9f85ba90ae6014be.zip
git-cd42415fb4c9680f308ebf8f9f85ba90ae6014be.tar.gz
git-cd42415fb4c9680f308ebf8f9f85ba90ae6014be.tar.bz2
sparse-index: add 'sdir' index extension
The index format does not currently allow for sparse directory entries. This violates some expectations that older versions of Git or third-party tools might not understand. We need an indicator inside the index file to warn these tools to not interact with a sparse index unless they are aware of sparse directory entries. Add a new _required_ index extension, 'sdir', that indicates that the index may contain sparse directory entries. This allows us to continue to use the differences in index formats 2, 3, and 4 before we create a new index version 5 in a later change. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/index-format.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 3b74c05..65da0da 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -392,3 +392,15 @@ The remaining data of each directory block is grouped by type:
in this block of entries.
- 32-bit count of cache entries in this block
+
+== Sparse Directory Entries
+
+ When using sparse-checkout in cone mode, some entire directories within
+ the index can be summarized by pointing to a tree object instead of the
+ entire expanded list of paths within that tree. An index containing such
+ entries is a "sparse index". Index format versions 4 and less were not
+ implemented with such entries in mind. Thus, for these versions, an
+ index containing sparse directory entries will include this extension
+ with signature { 's', 'd', 'i', 'r' }. Like the split-index extension,
+ tools should avoid interacting with a sparse index unless they understand
+ this extension.