diff options
author | Patryk Obara <patryk.obara@gmail.com> | 2018-01-28 01:13:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-30 19:42:36 +0100 |
commit | a09c985eae694db1cf31c72db0e2e1bf42f1274f (patch) | |
tree | 3acdfc26ab59d2ac822e4b4cf6ad93bf746fb65d /notes-cache.c | |
parent | notes: convert write_notes_tree to object_id (diff) | |
download | git-a09c985eae694db1cf31c72db0e2e1bf42f1274f.tar.xz git-a09c985eae694db1cf31c72db0e2e1bf42f1274f.zip |
sha1_file: convert write_sha1_file to object_id
Convert the definition and declaration of write_sha1_file to
struct object_id and adjust usage of this function.
This commit also converts static function write_sha1_file_prepare, as it
is closely related.
Rename these functions to write_object_file and
write_object_file_prepare respectively.
Replace sha1_to_hex, hashcpy and hashclr with their oid equivalents
wherever possible.
Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-cache.c')
-rw-r--r-- | notes-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/notes-cache.c b/notes-cache.c index 010ad236cb..398e61d5e9 100644 --- a/notes-cache.c +++ b/notes-cache.c @@ -88,7 +88,7 @@ int notes_cache_put(struct notes_cache *c, struct object_id *key_oid, { struct object_id value_oid; - if (write_sha1_file(data, size, "blob", value_oid.hash) < 0) + if (write_object_file(data, size, "blob", &value_oid) < 0) return -1; return add_note(&c->tree, key_oid, &value_oid, NULL); } |