X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fast-export.c;h=ef27eee71bdef2cac6f751e07b1da71588989b03;hb=56c3eb173293d512fa85add94a7d0a3bfc6fe74a;hp=2136aadfd7831828ee29fbfa9ae7974c65271dee;hpb=d9f405931fa3d96b2a80fe5ad8205eea7c443f56;p=git.git diff --git a/builtin-fast-export.c b/builtin-fast-export.c index 2136aadfd..ef27eee71 100755 --- a/builtin-fast-export.c +++ b/builtin-fast-export.c @@ -103,7 +103,7 @@ static void handle_object(const unsigned char *sha1) mark_object(object); printf("blob\nmark :%d\ndata %lu\n", last_idnum, size); - if (fwrite(buf, size, 1, stdout) != 1) + if (size && fwrite(buf, size, 1, stdout) != 1) die ("Could not write blob %s", sha1_to_hex(sha1)); printf("\n");