diff options
Diffstat (limited to 'builtin/gc.c')
| -rw-r--r-- | builtin/gc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 19d73067aa..2ebae7bc17 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1708,6 +1708,16 @@ static int get_schedule_cmd(const char **cmd, int *is_available) return 1; } +MAYBE_UNUSED +static int get_random_minute(void) +{ + /* Use a static value when under tests. */ + if (getenv("GIT_TEST_MAINT_SCHEDULER")) + return 13; + + return git_rand() % 60; +} + static int is_launchctl_available(void) { const char *cmd = "launchctl"; |
