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>
This commit is contained in:

committed by
Junio C Hamano

parent
bbca96d579
commit
a09c985eae
4
cache.h
4
cache.h
@ -1240,7 +1240,9 @@ extern int sha1_object_info(const unsigned char *, unsigned long *);
|
||||
extern int hash_object_file(const void *buf, unsigned long len,
|
||||
const char *type, struct object_id *oid);
|
||||
|
||||
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
|
||||
extern int write_object_file(const void *buf, unsigned long len,
|
||||
const char *type, struct object_id *oid);
|
||||
|
||||
extern int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type, struct object_id *oid, unsigned flags);
|
||||
|
||||
extern int pretend_object_file(void *, unsigned long, enum object_type,
|
||||
|
Reference in New Issue
Block a user