diff options
| author | Jameson Miller <jamill@microsoft.com> | 2012-09-26 17:21:32 -0400 |
|---|---|---|
| committer | Jameson Miller <jamill@microsoft.com> | 2012-09-27 13:12:27 -0400 |
| commit | addc9be4fcb88e77107557e991bd92355522d844 (patch) | |
| tree | 60f4bf02508f6f331d0d72c90cf1b0fcbf8cc162 /src/odb.c | |
| parent | 5942bd18bf557cc70873009c4303a421c83f0129 (diff) | |
| download | libgit2-addc9be4fcb88e77107557e991bd92355522d844.tar.gz | |
Fix error hashing empty file.
Diffstat (limited to 'src/odb.c')
| -rw-r--r-- | src/odb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -115,7 +115,7 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type) int hdr_len; char hdr[64], buffer[2048]; git_hash_ctx *ctx; - ssize_t read_len = -1; + ssize_t read_len = 0; if (!git_object_typeisloose(type)) { giterr_set(GITERR_INVALID, "Invalid object type for hash"); |
