Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-29 22:38:12 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-29 22:38:12 +0300
commit9d98862bf5d0f0557e1a822491bb792abcd022cf (patch)
tree769e2e3bf1eed795147138ff54ed504ce88d5def
parent2b312841a84fbfc4b761f7f9e050a6fbbbad2509 (diff)
parent02638d1e1153eb89d51a72de51ad854a88c9a178 (diff)
Merge branch 'vn/xmmap-gently' into maint
Clean-up an error codepath. * vn/xmmap-gently: read-cache.c: do not die if mmap fails
-rw-r--r--read-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 32816763bd..7b1be1b671 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -2140,7 +2140,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
if (mmap_size < sizeof(struct cache_header) + the_hash_algo->rawsz)
die(_("%s: index file smaller than expected"), path);
- mmap = xmmap(NULL, mmap_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ mmap = xmmap_gently(NULL, mmap_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (mmap == MAP_FAILED)
die_errno(_("%s: unable to map index file"), path);
close(fd);