Skip to content

Commit 1752cbb

Browse files
dreamergitster
authored andcommitted
sha1_file: rename hash_sha1_file_literally
This function was already converted to use struct object_id earlier. Signed-off-by: Patryk Obara <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3fc7281 commit 1752cbb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

builtin/hash-object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ static int hash_literally(struct object_id *oid, int fd, const char *type, unsig
2424
if (strbuf_read(&buf, fd, 4096) < 0)
2525
ret = -1;
2626
else
27-
ret = hash_sha1_file_literally(buf.buf, buf.len, type, oid, flags);
27+
ret = hash_object_file_literally(buf.buf, buf.len, type, oid,
28+
flags);
2829
strbuf_release(&buf);
2930
return ret;
3031
}

cache.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,9 @@ extern int hash_object_file(const void *buf, unsigned long len,
12431243
extern int write_object_file(const void *buf, unsigned long len,
12441244
const char *type, struct object_id *oid);
12451245

1246-
extern int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type, struct object_id *oid, unsigned flags);
1246+
extern int hash_object_file_literally(const void *buf, unsigned long len,
1247+
const char *type, struct object_id *oid,
1248+
unsigned flags);
12471249

12481250
extern int pretend_object_file(void *, unsigned long, enum object_type,
12491251
struct object_id *oid);

sha1_file.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,8 +1652,9 @@ int write_object_file(const void *buf, unsigned long len, const char *type,
16521652
return write_loose_object(oid, hdr, hdrlen, buf, len, 0);
16531653
}
16541654

1655-
int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type,
1656-
struct object_id *oid, unsigned flags)
1655+
int hash_object_file_literally(const void *buf, unsigned long len,
1656+
const char *type, struct object_id *oid,
1657+
unsigned flags)
16571658
{
16581659
char *header;
16591660
int hdrlen, status = 0;

0 commit comments

Comments
 (0)