Re: [PATCH v2 1/1] maintenance: use systemd timers on Linux
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 10, 2021, 20:52 UTC
- Message-ID
- <CAPig+cTmWBMJctFpfWe_Fw5w5oo_jMuLOSSXGs_o=tD89uAzkw@mail.gmail.com>
- In-Reply-To
- <72be08d4-1b2d-f400-f99d-c348ae667bdb@gmail.com>
On Mon, May 10, 2021 at 4:09 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 9 quoted lines
> 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.