]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-fetch-pack.c
Merge branch 'cw/bisect'
[git.git] / builtin-fetch-pack.c
index f40135248a5a1e2012c4cb01667f037407aae800..5ea48ca7dbc22785f4e4f3c35f3dc48ee18f0d8a 100644 (file)
@@ -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]);