X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=bundle.c;h=0ba5df17e15d679b03fe38af40260c118c9588fa;hb=c149184;hp=bd12ec8537781c5c82e77637312ccabb708d5040;hpb=5372715ed268b190b022a12579767816ea6738ae;p=git.git diff --git a/bundle.c b/bundle.c index bd12ec853..0ba5df17e 100644 --- a/bundle.c +++ b/bundle.c @@ -333,10 +333,12 @@ int create_bundle(struct bundle_header *header, const char *path, write_or_die(rls.in, sha1_to_hex(object->sha1), 40); write_or_die(rls.in, "\n", 1); } + close(rls.in); if (finish_command(&rls)) return error ("pack-objects died"); - - return bundle_to_stdout ? close(bundle_fd) : commit_lock_file(&lock); + if (!bundle_to_stdout) + commit_lock_file(&lock); + return 0; } int unbundle(struct bundle_header *header, int bundle_fd)