diff options
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sha1_file.c b/sha1_file.c index dc940e63c4..5d320753c3 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2945,9 +2945,8 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen, return move_temp_to_file(tmp_file, filename); } -int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *returnsha1) +int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *sha1) { - unsigned char sha1[20]; char hdr[32]; int hdrlen; @@ -2955,8 +2954,6 @@ int write_sha1_file(const void *buf, unsigned long len, const char *type, unsign * it out into .git/objects/??/?{38} file. */ write_sha1_file_prepare(buf, len, type, sha1, hdr, &hdrlen); - if (returnsha1) - hashcpy(returnsha1, sha1); if (has_sha1_file(sha1)) return 0; return write_loose_object(sha1, hdr, hdrlen, buf, len, 0); |