mirror of
https://github.com/git/git.git
synced 2024-11-18 23:23:51 +01:00
Merge branch 'mh/import-transport-fd-fix'
The ownership rule for the file descriptor to fast-import remote backend was mixed up, leading to unrelated file descriptor getting closed, which has been fixed. * mh/import-transport-fd-fix: Use xmmap_gently instead of xmmap in use_pack dup() the input fd for fast-import used for remote helpers
This commit is contained in:
commit
2a983b227d
@ -640,7 +640,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)
|
||||
|
@ -423,7 +423,7 @@ static int get_importer(struct transport *transport, struct child_process *fasti
|
||||
struct helper_data *data = transport->data;
|
||||
int cat_blob_fd, code;
|
||||
child_process_init(fastimport);
|
||||
fastimport->in = helper->out;
|
||||
fastimport->in = xdup(helper->out);
|
||||
argv_array_push(&fastimport->args, "fast-import");
|
||||
argv_array_push(&fastimport->args, debug ? "--stats" : "--quiet");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user