summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-02-01 06:35:31 -0800
committerEdward Thomson <ethomson@edwardthomson.com>2018-02-09 10:16:46 +0000
commit138e4c2bd07690e8956c4733b90b024c65a2ef88 (patch)
treefa15915aa6994f0bbd989dd05d3ffc0aa856fa4a
parent35ed256bb7c971e56f3f544c3529a53e39f39b28 (diff)
downloadlibgit2-138e4c2bd07690e8956c4733b90b024c65a2ef88.tar.gz
git_odb__hashfd: propagate error on failures
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 47fdd13dd..82b4310cf 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -194,7 +194,7 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type)
}
if ((error = git_hash_ctx_init(&ctx)) < 0)
- return -1;
+ return error;
hdr_len = git_odb__format_object_header(hdr, sizeof(hdr), size, type);