diff options
author | Mike Hommey <mh@glandium.org> | 2019-05-16 03:37:36 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-16 12:02:30 +0300 |
commit | 3203566a7109e2b83519b379581005cee178c3fd (patch) | |
tree | 9034bfc433d47a4d42e19edd5f79b60f9eda7466 /packfile.c | |
parent | 8b3554279cb2608118b2881744135fb6f3069c32 (diff) |
Use xmmap_gently instead of xmmap in use_pack
use_pack has its own error message on mmap error, but it can't be
reached when using xmmap, which dies with its own error.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c index 16bcb75262..6a66b605e9 100644 --- a/packfile.c +++ b/packfile.c @@ -630,7 +630,7 @@ unsigned char *use_pack(struct packed_git *p, while (packed_git_limit < pack_mapped && unuse_one_window(p)) ; /* nothing */ - win->base = xmmap(NULL, win->len, + win->base = xmmap_gently(NULL, win->len, PROT_READ, MAP_PRIVATE, p->pack_fd, win->offset); if (win->base == MAP_FAILED) |