Make sure packedgitwindowsize is multiple of (pagesize * 2)
[gitweb.git] / entry.c
diff --git a/entry.c b/entry.c
index 88df7139477f94c236f93ca835c28ed4dd9543de..c2641ddefdfde5ccb08af900ac48378231f969c7 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -89,7 +89,8 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
                        return error("git-checkout-index: unable to create file %s (%s)",
                                path, strerror(errno));
                }
-               wrote = write(fd, new, size);
+               /* FIXME: LF -> CRLF conversion goes here, based on "ce->name" */
+               wrote = write_in_full(fd, new, size);
                close(fd);
                free(new);
                if (wrote != size)
@@ -104,7 +105,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
                                return error("git-checkout-index: unable to create "
                                                 "file %s (%s)", path, strerror(errno));
                        }
-                       wrote = write(fd, new, size);
+                       wrote = write_in_full(fd, new, size);
                        close(fd);
                        free(new);
                        if (wrote != size)