Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-12-21 18:13:25 +0400
committerJunio C Hamano <gitster@pobox.com>2013-12-26 23:50:20 +0400
commit9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3 (patch)
treecb64ac3da277efb553994e4d9fda5bad1acfbec1 /builtin/pack-objects.c
parent7794a680e63a2a11b73cb1194653662f2769a792 (diff)
do not pretend sha1write returns errors
The sha1write function returns an int, but it will always be "0". The failure-prone parts of the function happen in the "flush" callback, which cannot pass an error back to us. So we just end up calling die() during the flush. Let's just drop the return value altogether, as it only confuses callers into thinking that it might be useful. Only one call site actually checked the return value. We can drop that check, since it just led to a die() anyway. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index dfb4d84caa..541667f102 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -737,8 +737,6 @@ static void write_pack_file(void)
f = create_tmp_packfile(&pack_tmp_name);
offset = write_pack_header(f, nr_remaining);
- if (!offset)
- die_errno("unable to write pack header");
nr_written = 0;
for (; i < nr_objects; i++) {
struct object_entry *e = write_order[i];