Re: [PATCH] read-cache.c: do not die if mmap fails

2019-07-14 Thread Junio C Hamano
Varun Naik writes: > do_read_index() mmaps the index, or tries to die with an error message > on failure. It should call xmmap_gently(), which returns MAP_FAILED, > rather than xmmap(), which dies with its own error message. > > An easy way to cause this mmap to fail is by setting $GIT_INDEX_FILE

[PATCH] read-cache.c: do not die if mmap fails

2019-07-13 Thread Varun Naik
do_read_index() mmaps the index, or tries to die with an error message on failure. It should call xmmap_gently(), which returns MAP_FAILED, rather than xmmap(), which dies with its own error message. An easy way to cause this mmap to fail is by setting $GIT_INDEX_FILE to a path to a directory and