aboutsummaryrefslogtreecommitdiffstats
path: root/archive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-03-28 14:13:50 -0700
committerJunio C Hamano <gitster@pobox.com>2024-03-28 14:13:50 -0700
commit1002f28a527d33893f7dab068dbac7011f84af65 (patch)
tree9b9ada23d952e936d496597d03064c10d8d9f73d /archive.c
parentc75fd8d8150afdf836b63a8e0534d9b9e3e111ba (diff)
parent7673ecd2dcdcf0aae01cccdb5c25f9b96160a8c0 (diff)
downloadgit-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 'archive.c')
-rw-r--r--archive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index a6730bebfa..5287fcdd8e 100644
--- a/archive.c
+++ b/archive.c
@@ -339,7 +339,8 @@ int write_archive_entries(struct archiver_args *args,
opts.src_index = args->repo->index;
opts.dst_index = args->repo->index;
opts.fn = oneway_merge;
- init_tree_desc(&t, args->tree->buffer, args->tree->size);
+ init_tree_desc(&t, &args->tree->object.oid,
+ args->tree->buffer, args->tree->size);
if (unpack_trees(1, &t, &opts))
return -1;
git_attr_set_direction(GIT_ATTR_INDEX);