sha1_file: rename hash_sha1_file_literally
authorPatryk Obara <patryk.obara@gmail.com>
Sun, 28 Jan 2018 00:13:22 +0000 (01:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jan 2018 18:42:36 +0000 (10:42 -0800)
This function was already converted to use struct object_id earlier.

Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/hash-object.c
cache.h
sha1_file.c
index c532ff9320c751d1db5475add51f2c3c6a8c7146..526da5c1856ed1c387975a767f4d01382d1ea1a9 100644 (file)
@@ -24,7 +24,8 @@ static int hash_literally(struct object_id *oid, int fd, const char *type, unsig
        if (strbuf_read(&buf, fd, 4096) < 0)
                ret = -1;
        else
-               ret = hash_sha1_file_literally(buf.buf, buf.len, type, oid, flags);
+               ret = hash_object_file_literally(buf.buf, buf.len, type, oid,
+                                                flags);
        strbuf_release(&buf);
        return ret;
 }
diff --git a/cache.h b/cache.h
index 0a8be9c87f04f3b7147d06472637a2beb8a9a86c..6ef42489318789a65383e8050984b884fc8c4f42 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1243,7 +1243,9 @@ extern int hash_object_file(const void *buf, unsigned long len,
 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 hash_object_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,
                               struct object_id *oid);
index 59238f5bea9c666d3c4976fb16b510c9883b9f9c..34c041e8cd12a4d5198e051f3b911b5ff1ae4425 100644 (file)
@@ -1652,8 +1652,9 @@ int write_object_file(const void *buf, unsigned long len, const char *type,
        return write_loose_object(oid, hdr, hdrlen, buf, len, 0);
 }
 
-int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type,
-                            struct object_id *oid, unsigned flags)
+int hash_object_file_literally(const void *buf, unsigned long len,
+                              const char *type, struct object_id *oid,
+                              unsigned flags)
 {
        char *header;
        int hdrlen, status = 0;