X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=receive-pack.c;h=f83ae87e150ff93728da989f1d35ce0ad7c10f60;hb=fae09a8084c9b51632726523b477a78dd28d7d7e;hp=326749583221d0f5e81f58608a23ab1dc1601177;hpb=a41acc63badf20cbb22cca61039dca9309deaa19;p=git.git diff --git a/receive-pack.c b/receive-pack.c index 326749583..f83ae87e1 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -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(); @@ -469,6 +471,8 @@ int main(int argc, char **argv) if (!dir) usage(receive_pack_usage); + setup_path(NULL); + if (!enter_repo(dir, 0)) die("'%s': unable to chdir or not a git archive", dir);