Skip to content

Commit b9183b0

Browse files
derrickstoleegitster
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]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f55519 commit b9183b0

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
@@ -723,6 +723,9 @@ static int cmd_reconfigure(int argc, const char **argv)
723723

724724
the_repository = old_repo;
725725

726+
if (toggle_maintenance(1) >= 0)
727+
succeeded = 1;
728+
726729
loop_end:
727730
if (!succeeded) {
728731
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 'scalar reconfigure --all with includeIf.onbranch' '

0 commit comments

Comments
 (0)