Re: [PATCH 3/4] repack: use tempfiles for signal cleanup
- From
Jeff King <peff@peff.net>
- Date
- Oct 22, 2022, 00:12 UTC
- Message-ID
- <Y1M1bFNV8DybuJtt@coredump.intra.peff.net>
- In-Reply-To
- <Y1MvGIVz9bTTsS25@nand.local>
On Fri, Oct 21, 2022 at 07:45:28PM -0400, Taylor Blau wrote:
> TBH, I've always found fname_old to be a confusing name. It's not really > "old", in fact we just had pack-objects write that file ;-). It really > does pertain to the tempfile, and I think using get_tempfile_path() when > we have a tempfile to rename is sensible.
I don't love it either, but I've kept it in what I'm preparing, just because we need _some_ variable to avoid writing:
get_tempfile_path(data->tempfiles[ext])
over and over. And using the same one keeps the diff minimal. If it's too terrible we can rename it on top. :)
> I think that your proposed error message is good, too, and doubly so > since it lets us get rid of fname_old entirely. Yay :-).
Thanks. I'm preparing something along those lines.
-Peff