Skip to content

Commit 39d4aee

Browse files
derrickstoleedscho
authored andcommitted
scalar: configure maintenance during 'reconfigure'
The 'scalar reconfigure' command is intended to update registered repos with the latest settings available. However, up to now we were not reregistering the repos with background maintenance. In particular, this meant that the background maintenance schedule would not be updated if there are improvements between versions. Be sure to register repos for maintenance during the reconfigure step. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
1 parent 3530948 commit 39d4aee

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

scalar.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,9 @@ static int cmd_reconfigure(int argc, const char **argv)
11001100
if (set_recommended_config(1) < 0)
11011101
failed = -1;
11021102

1103+
if (toggle_maintenance(1) < 0)
1104+
failed = -1;
1105+
11031106
loop_end:
11041107
if (failed) {
11051108
res = failed;

t/t9210-scalar.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,11 @@ test_expect_success 'scalar reconfigure' '
176176
scalar reconfigure one &&
177177
test true = "$(git -C one/src config core.preloadIndex)" &&
178178
git -C one/src config core.preloadIndex false &&
179-
scalar reconfigure -a &&
180-
test true = "$(git -C one/src config core.preloadIndex)"
179+
rm one/src/cron.txt &&
180+
GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
181+
test_path_is_file one/src/cron.txt &&
182+
test true = "$(git -C one/src config core.preloadIndex)" &&
183+
test_subcommand git maintenance start <reconfigure
181184
'
182185

183186
test_expect_success '`reconfigure -a` removes stale config entries' '

0 commit comments

Comments
 (0)