Skip to content

Commit c0a3cb5

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 <[email protected]>
1 parent cdf3ce6 commit c0a3cb5

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
@@ -1102,6 +1102,9 @@ static int cmd_reconfigure(int argc, const char **argv)
11021102
if (set_recommended_config(1) >= 0)
11031103
succeeded = 1;
11041104

1105+
if (toggle_maintenance(1) >= 0)
1106+
succeeded = 1;
1107+
11051108
loop_end:
11061109
if (!succeeded) {
11071110
res = -1;

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)