This is a small patch series to refactor the code that actually writes a promisor file (<pack-name>.promisor) into a write_promisor_file() function, and then to improve it a bit. Compared to version 1 of this patch series, the only difference is that patch 3/3 has been added to die() in case of error, instead of ignoring it, when actually writing the content of the file or closing it. Thanks to Peff and Taylor for their suggestions. Discussion about V1: https://lore.kernel.org/git/20210112082159.2277214-1-chriscool@xxxxxxxxxxxxx/ Christian Couder (3): fetch-pack: rename helper to create_promisor_file() fetch-pack: refactor writing promisor file pack-write: die on error in write_promisor_file() builtin/repack.c | 8 +++----- fetch-pack.c | 16 +++++----------- pack-write.c | 16 ++++++++++++++++ pack.h | 4 ++++ 4 files changed, 28 insertions(+), 16 deletions(-) -- 2.30.0.83.g36fd80b35a.dirty