X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-pack-refs.c;h=758499238f6d4110eb3740b77c92753edc8e5760;hb=71e55854fd6e5c9ce786bcd20efef43bd56f9df0;hp=1952950c9a4bf13dc728bb8d6a79493dad36df06;hpb=1924d64f6e070edf1ad1949bf2eb95d4d2451f30;p=git.git diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c index 1952950c9..758499238 100644 --- a/builtin-pack-refs.c +++ b/builtin-pack-refs.c @@ -105,6 +105,8 @@ static int pack_refs(unsigned int flags) fprintf(cbdata.refs_file, "# pack-refs with: peeled \n"); for_each_ref(handle_one_ref, &cbdata); + if (ferror(cbdata.refs_file)) + die("failed to write ref-pack file"); if (fflush(cbdata.refs_file) || fsync(fd) || fclose(cbdata.refs_file)) die("failed to write ref-pack file (%s)", strerror(errno)); if (commit_lock_file(&packed) < 0)