Skip to content

Commit 06cb843

Browse files
Stefan Saasengitster
authored andcommitted
Documentation: distinguish between ref and offset deltas in pack-format
eb32d23 introduced the OBJ_OFS_DELTA object that uses a relative offset to identify the base object instead of the 20-byte SHA1 reference. The pack file documentation only mentions the SHA1 based reference in its description of the deltified object entry. Update the pack format documentation to clarify that the deltified object representation refers to its base using either a relative negative offset or the absolute SHA1 identifier. Signed-off-by: Stefan Saasen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2137ce0 commit 06cb843

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/technical/pack-format.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ GIT pack format
2626

2727
(deltified representation)
2828
n-byte type and length (3-bit type, (n-1)*7+4-bit length)
29-
20-byte base object name
29+
20-byte base object name if OBJ_REF_DELTA or a negative relative
30+
offset from the delta object's position in the pack if this
31+
is an OBJ_OFS_DELTA object
3032
compressed delta data
3133

3234
Observation: length of each object is encoded in a variable

0 commit comments

Comments
 (0)