From: Stefan Sperling Subject: Re: Move got_opentempfd out of got_repo_open To: gameoftrees@openbsd.org Date: Thu, 2 Jun 2022 20:44:23 +0200 On Thu, Jun 02, 2022 at 12:35:29PM -0600, Tracey Emery wrote: > Before I send a nearly final diff, any objections to moving the closing > of the fds out to a got_repo_pack_fds_close()? It seems odd to me to > open the fds by the caller, but a hidden process closing them for the > caller. For example, got_repo_close isn't magic. Thoughts about that? Yes, it should be easy to keep track of where files get closed. The best spot is the same scope that opened them, or, failing that, somewhere else where closing makes sense from the caller's point of view. So moving got_opentempfd() out of got_repo_open() means closing of the files should probably be moved out of got_repo_close() as well.