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 /merge-ort.c | |
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 'merge-ort.c')
-rw-r--r-- | merge-ort.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/merge-ort.c b/merge-ort.c index 201f8f7775..ac225cc33c 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -1665,9 +1665,10 @@ static int collect_merge_info(struct merge_options *opt, parse_tree(side1) < 0 || parse_tree(side2) < 0) return -1; - init_tree_desc(t + 0, merge_base->buffer, merge_base->size); - init_tree_desc(t + 1, side1->buffer, side1->size); - init_tree_desc(t + 2, side2->buffer, side2->size); + init_tree_desc(t + 0, &merge_base->object.oid, + merge_base->buffer, merge_base->size); + init_tree_desc(t + 1, &side1->object.oid, side1->buffer, side1->size); + init_tree_desc(t + 2, &side2->object.oid, side2->buffer, side2->size); trace2_region_enter("merge", "traverse_trees", opt->repo); ret = traverse_trees(NULL, 3, t, &info); @@ -4446,10 +4447,10 @@ static int checkout(struct merge_options *opt, unpack_opts.preserve_ignored = 0; /* FIXME: !opts->overwrite_ignore */ if (parse_tree(prev) < 0) return -1; - init_tree_desc(&trees[0], prev->buffer, prev->size); + init_tree_desc(&trees[0], &prev->object.oid, prev->buffer, prev->size); if (parse_tree(next) < 0) return -1; - init_tree_desc(&trees[1], next->buffer, next->size); + init_tree_desc(&trees[1], &next->object.oid, next->buffer, next->size); ret = unpack_trees(2, trees, &unpack_opts); clear_unpack_trees_porcelain(&unpack_opts); |