mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
object-file: add a compat_oid_in parameter to write_object_file_flags
To create the proper signatures for commit objects both versions of the commit object need to be generated and signed. After that it is a waste to throw away the work of generating the compatibility hash so update write_object_file_flags to take a compatibility hash input parameter that it can use to skip the work of generating the compatability hash. Update the places that don't generate the compatability hash to pass NULL so it is easy to tell write_object_file_flags should not attempt to use their compatability hash. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
63a6745a07
commit
c2538492df
@@ -448,7 +448,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;
|
||||
|
||||
Reference in New Issue
Block a user