diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-05-06 21:21:04 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-05-09 09:40:29 +0200 |
commit | ae0817393c0aaff5c4b085c46ed11acc0ab64198 (patch) | |
tree | a6ca97965478c4abd6168b0d1f7b58c4e9146c31 | |
parent | 86d5810b82965224b1270c3627da029588935abb (diff) | |
download | libgit2-ae0817393c0aaff5c4b085c46ed11acc0ab64198.tar.gz |
pack: do not repeat the same error message four times
Repeating this error message makes it harder to find out where we
actually are finding the error, and they don't really describe what
we're trying to do.
-rw-r--r-- | src/pack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pack.c b/src/pack.c index 9c6a4e78b..b9374d04f 100644 --- a/src/pack.c +++ b/src/pack.c @@ -653,7 +653,7 @@ int git_packfile_stream_open(git_packfile_stream *obj, struct git_pack_file *p, st = inflateInit(&obj->zstream); if (st != Z_OK) { git__free(obj); - giterr_set(GITERR_ZLIB, "Failed to inflate packfile"); + giterr_set(GITERR_ZLIB, "failed to init packfile stream"); return -1; } @@ -684,7 +684,7 @@ ssize_t git_packfile_stream_read(git_packfile_stream *obj, void *buffer, size_t written = len - obj->zstream.avail_out; if (st != Z_OK && st != Z_STREAM_END) { - giterr_set(GITERR_ZLIB, "Failed to inflate packfile"); + giterr_set(GITERR_ZLIB, "error reading from the zlib stream"); return -1; } @@ -729,7 +729,7 @@ int packfile_unpack_compressed( st = inflateInit(&stream); if (st != Z_OK) { git__free(buffer); - giterr_set(GITERR_ZLIB, "Failed to inflate packfile"); + giterr_set(GITERR_ZLIB, "failed to init zlib stream on unpack"); return -1; } @@ -756,7 +756,7 @@ int packfile_unpack_compressed( if ((st != Z_STREAM_END) || stream.total_out != size) { git__free(buffer); - giterr_set(GITERR_ZLIB, "Failed to inflate packfile"); + giterr_set(GITERR_ZLIB, "error inflating zlib stream"); return -1; } |