Code

Make 'unpack_trees()' have a separate source and destination index
[git.git] / receive-pack.c
index c90ec7dde28ec135f0c90e6c731b730ad4a1f7a8..f83ae87e150ff93728da989f1d35ce0ad7c10f60 100644 (file)
@@ -132,6 +132,7 @@ static int run_hook(const char *hook_name)
                                break;
                }
        }
+       close(proc.in);
        return hook_status(finish_command(&proc), hook_name);
 }
 
@@ -414,6 +415,7 @@ static const char *unpack(void)
                if (start_command(&ip))
                        return "index-pack fork failed";
                pack_lockfile = index_pack_lockfile(ip.out);
+               close(ip.out);
                status = finish_command(&ip);
                if (!status) {
                        reprepare_packed_git();