]> git.ipfire.org Git - thirdparty/git.git/commit - pack-write.c
pack-write: die on error in write_promisor_file()
authorChristian Couder <christian.couder@gmail.com>
Thu, 14 Jan 2021 15:50:16 +0000 (16:50 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2021 01:02:22 +0000 (17:02 -0800)
commit7c99bc23fcd69eeebf8a92263b5d90673c510a6a
tree5e582f9e9d3c4828da2b81181c2222e80fa7893c
parent33add2ad7d6921489aa0cafd4a865504c3709512
pack-write: die on error in write_promisor_file()

write_promisor_file() already uses xfopen(), so it would die
if the file cannot be opened for writing. To be consistent
with this behavior and not overlook issues, let's also die if
there are errors when we are actually writing to the file.

Suggested-by: Jeff King <peff@peff.net>
Suggested-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-write.c