Skip to content

Commit

Permalink
Documentation: distinguish between ref and offset deltas in pack-format
Browse files Browse the repository at this point in the history
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 <ssaasen@atlassian.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefan Saasen authored and Junio C Hamano committed Apr 12, 2013
1 parent 2137ce0 commit 06cb843
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/technical/pack-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ GIT pack format

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

Observation: length of each object is encoded in a variable
Expand Down

0 comments on commit 06cb843

Please sign in to comment.