X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bundle.c;h=0ba5df17e15d679b03fe38af40260c118c9588fa;hb=afce435000030e3ad076ef1dd413e0fa314cdcbb;hp=bd12ec8537781c5c82e77637312ccabb708d5040;hpb=356eff534cfb181cb65f92240692ff4306e3212a;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)