X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=bundle.c;h=0ba5df17e15d679b03fe38af40260c118c9588fa;hb=049a226fa14fb25c03d2146c2f8f184cfea5e5bf;hp=bd12ec8537781c5c82e77637312ccabb708d5040;hpb=22c430ad8468133fa5ed46d8407d7f4cde2c4a0e;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)