diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index f40135248a5a1e2012c4cb01667f037407aae800..b23e886d757664208f22bdfebbc21e4af103f69e 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
int retval;
unsigned long cutoff = 0;
- track_object_refs = 0;
save_commit_buffer = 0;
for (ref = *refs; ref; ref = ref->next) {
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]);