diff options
author | Patryk Obara <patryk.obara@gmail.com> | 2017-08-20 22:09:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-20 21:52:53 -0700 |
commit | da77611d73f3173aa49d362bd7b12a608fb34b94 (patch) | |
tree | e30451a53d2fa28874e2546d90cfbec95b3e7868 /sha1_file.c | |
parent | e3506559d476ccf94c923c30a15500b46204e146 (diff) | |
download | git-da77611d73f3173aa49d362bd7b12a608fb34b94.tar.gz |
sha1_file: convert hash_sha1_file_literally to struct object_id
Convert all remaining callers as well.
Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sha1_file.c b/sha1_file.c index 132b25bd74..c9a230a1e2 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3437,7 +3437,7 @@ int write_sha1_file(const void *buf, unsigned long len, const char *type, unsign } int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type, - unsigned char *sha1, unsigned flags) + struct object_id *oid, unsigned flags) { char *header; int hdrlen, status = 0; @@ -3445,13 +3445,13 @@ int hash_sha1_file_literally(const void *buf, unsigned long len, const char *typ /* type string, SP, %lu of the length plus NUL must fit this */ hdrlen = strlen(type) + 32; header = xmalloc(hdrlen); - write_sha1_file_prepare(buf, len, type, sha1, header, &hdrlen); + write_sha1_file_prepare(buf, len, type, oid->hash, header, &hdrlen); if (!(flags & HASH_WRITE_OBJECT)) goto cleanup; - if (freshen_packed_object(sha1) || freshen_loose_object(sha1)) + if (freshen_packed_object(oid->hash) || freshen_loose_object(oid->hash)) goto cleanup; - status = write_loose_object(sha1, header, hdrlen, buf, len, 0); + status = write_loose_object(oid->hash, header, hdrlen, buf, len, 0); cleanup: free(header); |