diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-03-28 14:13:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-28 14:13:50 -0700 |
commit | 1002f28a527d33893f7dab068dbac7011f84af65 (patch) | |
tree | 9b9ada23d952e936d496597d03064c10d8d9f73d /object-store-ll.h | |
parent | c75fd8d8150afdf836b63a8e0534d9b9e3e111ba (diff) | |
parent | 7673ecd2dcdcf0aae01cccdb5c25f9b96160a8c0 (diff) | |
download | git-1002f28a527d33893f7dab068dbac7011f84af65.tar.gz |
Merge branch 'eb/hash-transition'
Work to support a repository that work with both SHA-1 and SHA-256
hash algorithms has started.
* eb/hash-transition: (30 commits)
t1016-compatObjectFormat: add tests to verify the conversion between objects
t1006: test oid compatibility with cat-file
t1006: rename sha1 to oid
test-lib: compute the compatibility hash so tests may use it
builtin/ls-tree: let the oid determine the output algorithm
object-file: handle compat objects in check_object_signature
tree-walk: init_tree_desc take an oid to get the hash algorithm
builtin/cat-file: let the oid determine the output algorithm
rev-parse: add an --output-object-format parameter
repository: implement extensions.compatObjectFormat
object-file: update object_info_extended to reencode objects
object-file-convert: convert commits that embed signed tags
object-file-convert: convert commit objects when writing
object-file-convert: don't leak when converting tag objects
object-file-convert: convert tag objects when writing
object-file-convert: add a function to convert trees between algorithms
object: factor out parse_mode out of fast-import and tree-walk into in object.h
cache: add a function to read an OID of a specific algorithm
tag: sign both hashes
commit: export add_header_signature to support handling signatures on tags
...
Diffstat (limited to 'object-store-ll.h')
-rw-r--r-- | object-store-ll.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/object-store-ll.h b/object-store-ll.h index 26a3895c82..c5f2bb2fc2 100644 --- a/object-store-ll.h +++ b/object-store-ll.h @@ -26,6 +26,9 @@ struct object_directory { uint32_t loose_objects_subdir_seen[8]; /* 256 bits */ struct oidtree *loose_objects_cache; + /* Map between object IDs for loose objects. */ + struct loose_object_map *loose_map; + /* * This is a temporary object store created by the tmp_objdir * facility. Disable ref updates since the objects in the store @@ -252,11 +255,11 @@ void hash_object_file(const struct git_hash_algo *algo, const void *buf, int write_object_file_flags(const void *buf, unsigned long len, enum object_type type, struct object_id *oid, - unsigned flags); + struct object_id *comapt_oid_in, unsigned flags); static inline int write_object_file(const void *buf, unsigned long len, enum object_type type, struct object_id *oid) { - return write_object_file_flags(buf, len, type, oid, 0); + return write_object_file_flags(buf, len, type, oid, NULL, 0); } int write_object_file_literally(const void *buf, unsigned long len, |