665d70ad03
The commit-graph format reserved a byte among the header of the file to
store a "hash version". During the SHA-256 work, this was not modified
because file formats are not necessarily intended to work across hash
versions. If a repository has SHA-256 as its hash algorithm, it
automatically up-shifts the lengths of object names in all necessary
formats.
However, since we have this byte available for adjusting the version, we
can make the file formats more obviously incompatible instead of relying
on other context from the repository.
Update the oid_version() method in commit-graph.c to add a new value, 2,
for sha-256. This automatically writes the new value in a SHA-256
repository _and_ verifies the value is correct. This is a breaking
change relative to the current 'master' branch since
|
||
---|---|---|
.. | ||
.gitignore | ||
api-error-handling.txt | ||
api-index-skel.txt | ||
api-index.sh | ||
api-merge.txt | ||
api-parse-options.txt | ||
api-trace2.txt | ||
bitmap-format.txt | ||
bundle-format.txt | ||
commit-graph-format.txt | ||
commit-graph.txt | ||
directory-rename-detection.txt | ||
hash-function-transition.txt | ||
http-protocol.txt | ||
index-format.txt | ||
long-running-process-protocol.txt | ||
multi-pack-index.txt | ||
pack-format.txt | ||
pack-heuristics.txt | ||
pack-protocol.txt | ||
packfile-uri.txt | ||
partial-clone.txt | ||
protocol-capabilities.txt | ||
protocol-common.txt | ||
protocol-v2.txt | ||
racy-git.txt | ||
reftable.txt | ||
repository-version.txt | ||
rerere.txt | ||
send-pack-pipeline.txt | ||
shallow.txt | ||
signature-format.txt | ||
trivial-merge.txt |