t7001: add test case for --dry-run
[gitweb.git] / rerere.c
index 70634d456cc0b70cdbac1579b82016761252c7d9..51376cf6da3b8ab8f8e0c4f20c307fef9dec8392 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -258,7 +258,7 @@ static int write_rr(struct string_list *rr, int out_fd)
                                    rerere_id_hex(id),
                                    rr->items[i].string, 0);
 
-               if (write_in_full(out_fd, buf.buf, buf.len) != buf.len)
+               if (write_in_full(out_fd, buf.buf, buf.len) < 0)
                        die("unable to write rerere record");
 
                strbuf_release(&buf);