diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-20 02:14:52 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-20 02:14:53 +0300 |
commit | 6f8a2138b96c8f33ebbe2055a9444ada40a8e1c8 (patch) | |
tree | 8ed6c5420da5f4be6a398ae8da7d30767c2258be /Documentation | |
parent | 74a395c4844f846d933b873c5548e19d06e1e89e (diff) | |
parent | d96075428a9a1de720f6019242dadb5dbaa0ac16 (diff) |
Merge branch 'ds/sha256-leftover-bits'
midx and commit-graph files now use the byte defined in their file
format specification for identifying the hash function used for
object names.
* ds/sha256-leftover-bits:
multi-pack-index: use hash version byte
commit-graph: use the "hash version" byte
t/README: document GIT_TEST_DEFAULT_HASH
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/technical/commit-graph-format.txt | 9 | ||||
-rw-r--r-- | Documentation/technical/pack-format.txt | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Documentation/technical/commit-graph-format.txt b/Documentation/technical/commit-graph-format.txt index 440541045d..6ddbceba15 100644 --- a/Documentation/technical/commit-graph-format.txt +++ b/Documentation/technical/commit-graph-format.txt @@ -42,8 +42,13 @@ HEADER: 1-byte version number: Currently, the only valid version is 1. - 1-byte Hash Version (1 = SHA-1) - We infer the hash length (H) from this value. + 1-byte Hash Version + We infer the hash length (H) from this value: + 1 => SHA-1 + 2 => SHA-256 + If the hash type does not match the repository's hash algorithm, the + commit-graph file should be ignored with a warning presented to the + user. 1-byte number (C) of "chunks" diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt index f4c8d94f73..f96b2e605f 100644 --- a/Documentation/technical/pack-format.txt +++ b/Documentation/technical/pack-format.txt @@ -279,7 +279,12 @@ HEADER: Git only writes or recognizes version 1. 1-byte Object Id Version - Git only writes or recognizes version 1 (SHA1). + We infer the length of object IDs (OIDs) from this value: + 1 => SHA-1 + 2 => SHA-256 + If the hash type does not match the repository's hash algorithm, + the multi-pack-index file should be ignored with a warning + presented to the user. 1-byte number of "chunks" |