diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-27 11:55:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-27 11:55:32 -0800 |
commit | f79ff5c975499089b03904a6619923683262bf22 (patch) | |
tree | 06d71decd7e4198f37687b5f604de9149904ce8c /builtin-fetch-pack.c | |
parent | 860cc3a4f9c3ac21fcd37bbe30f40ab073f01299 (diff) | |
parent | c20181e3a3e39f2c8874567c219e9edddb84393a (diff) | |
download | git-f79ff5c975499089b03904a6619923683262bf22.tar.gz |
Merge branch 'js/run-command'
* js/run-command:
start_command(), if .in/.out > 0, closes file descriptors, not the callers
start_command(), .in/.out/.err = -1: Callers must close the file descriptor
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r-- | builtin-fetch-pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index f40135248a..5ea48ca7db 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -538,8 +538,10 @@ static int get_pack(int xd[2], char **pack_lockfile) cmd.git_cmd = 1; if (start_command(&cmd)) die("fetch-pack: unable to fork off %s", argv[0]); - if (do_keep && pack_lockfile) + if (do_keep && pack_lockfile) { *pack_lockfile = index_pack_lockfile(cmd.out); + close(cmd.out); + } if (finish_command(&cmd)) die("%s failed", argv[0]); |