From: Eric Sunshine Date: Mon, 10 May 2021 20:52:49 GMT Subject: Re: [PATCH v2 1/1] maintenance: use systemd timers on Linux Message-ID: In-Reply-To: <72be08d4-1b2d-f400-f99d-c348ae667bdb@gmail.com> On Mon, May 10, 2021 at 4:09 PM Phillip Wood wrote: > It is outside the scope of this patch but a possibly nicer pattern would > be to have a function get_command_name(const char *default) that checks > GIT_TEST_MAINT_SCHEDULER and returns the command name from that or the > default if it is not set. We would then call that function to get the > command name when we want to run a command. That way all the extra > complexity is localized around the command call (and consists of a > single function call), the usual command name is visible in the function > calling the command and we'd avoid littering all the function signatures > with a argument that is only relevant for testing. Yup, that would be a nice eventual cleanup. I agree that it is outside the scope of this submission.