summaryrefslogtreecommitdiffstats
path: root/object-store-ll.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2023-10-02 04:40:12 +0200
committerJunio C Hamano <gitster@pobox.com>2023-10-02 23:57:39 +0200
commitc2538492df8259885abc18acdadacc22b1e77e5a (patch)
tree3864dd7a5963aa3c23a4a3f1487d7183359842d2 /object-store-ll.h
parentobject-file: update the loose object map when writing loose objects (diff)
downloadgit-c2538492df8259885abc18acdadacc22b1e77e5a.tar.xz
git-c2538492df8259885abc18acdadacc22b1e77e5a.zip
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>
Diffstat (limited to 'object-store-ll.h')
-rw-r--r--object-store-ll.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/object-store-ll.h b/object-store-ll.h
index bc76d6bec8..c5f2bb2fc2 100644
--- a/object-store-ll.h
+++ b/object-store-ll.h
@@ -255,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,