diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-24 12:57:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-24 12:57:52 -0700 |
commit | f4d3af185988ad45ebc0a6dead32222cad2c03a6 (patch) | |
tree | cdfbacf6e120e2eddfa417ad203a40e8dcafc3ae /builtin | |
parent | 296ab786eed237b59f76f6411e895cc1e3ce14ab (diff) | |
parent | d1a13d3fcb252631361a961cb5e2bf10ed467cba (diff) | |
download | git-f4d3af185988ad45ebc0a6dead32222cad2c03a6.tar.gz |
Merge branch 'jk/push-deadlock-regression-fix' into maint
"git push" had a handful of codepaths that could lead to a deadlock
when unexpected error happened, which has been fixed.
* jk/push-deadlock-regression-fix:
send-pack: report signal death of pack-objects
send-pack: read "unpack" status even on pack-objects failure
send-pack: improve unpack-status error messages
send-pack: use skip_prefix for parsing unpack status
send-pack: extract parsing of "unpack" response
receive-pack: fix deadlock when we cannot create tmpdir
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/receive-pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 1dbb8a0692..8672825e2e 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1664,8 +1664,11 @@ static const char *unpack(int err_fd, struct shallow_info *si) } tmp_objdir = tmp_objdir_create(); - if (!tmp_objdir) + if (!tmp_objdir) { + if (err_fd > 0) + close(err_fd); return "unable to create temporary object directory"; + } child.env = tmp_objdir_env(tmp_objdir); /* |