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 ...
This commit is contained in:
@@ -447,7 +447,7 @@ static int update_one(struct cache_tree *it,
|
||||
hash_object_file(the_hash_algo, buffer.buf, buffer.len,
|
||||
OBJ_TREE, &it->oid);
|
||||
} else if (write_object_file_flags(buffer.buf, buffer.len, OBJ_TREE,
|
||||
&it->oid, flags & WRITE_TREE_SILENT
|
||||
&it->oid, NULL, flags & WRITE_TREE_SILENT
|
||||
? HASH_SILENT : 0)) {
|
||||
strbuf_release(&buffer);
|
||||
return -1;
|
||||
@@ -769,7 +769,7 @@ static void prime_cache_tree_rec(struct repository *r,
|
||||
|
||||
oidcpy(&it->oid, &tree->object.oid);
|
||||
|
||||
init_tree_desc(&desc, tree->buffer, tree->size);
|
||||
init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);
|
||||
cnt = 0;
|
||||
while (tree_entry(&desc, &entry)) {
|
||||
if (!S_ISDIR(entry.mode))
|
||||
|
||||
Reference in New Issue
Block a user