Update packedGit config option documentation.
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index f14288bb8a100c43c6709f658b9a9ca44832fd7f..244292a70c5b8a86d23905036c4103d3d0c1df1c 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1341,10 +1341,8 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
                fd = open(s->path, O_RDONLY);
                if (fd < 0)
                        goto err_empty;
-               s->data = mmap(NULL, s->size, PROT_READ, MAP_PRIVATE, fd, 0);
+               s->data = xmmap(NULL, s->size, PROT_READ, MAP_PRIVATE, fd, 0);
                close(fd);
-               if (s->data == MAP_FAILED)
-                       goto err_empty;
                s->should_munmap = 1;
        }
        else {