commit: --amend -m '' silently fails to wipe message
[gitweb.git] / read-cache.c
index 36ff89f29e5f56a5b3dcfd803f12cd139295b8b8..bf322708f0ea7e855026950f6f1720ba056515ca 100644 (file)
@@ -1540,7 +1540,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
        if (mmap_size < sizeof(struct cache_header) + 20)
                die("index file smaller than expected");
 
-       mmap = xmmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+       mmap = xmmap(NULL, mmap_size, PROT_READ, MAP_PRIVATE, fd, 0);
        if (mmap == MAP_FAILED)
                die_errno("unable to map index file");
        close(fd);