Skip to content

Commit ed3858b

Browse files
committed
Merge branch 'ps/gc-stale-lock-warning' into next
Give a bit of advice/hint message when "git maintenance" stops finding a lock file left by another instance that still is potentially running. * ps/gc-stale-lock-warning: t7900: fix host-dependent behaviour when testing git-maintenance(1)
2 parents dd8b44a + ba874d1 commit ed3858b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

t/t7900-maintenance.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,10 +1011,15 @@ test_expect_success 'repacking loose objects is quiet' '
10111011
'
10121012

10131013
test_expect_success 'maintenance aborts with existing lock file' '
1014-
test_when_finished "rm -rf repo" &&
1014+
test_when_finished "rm -rf repo script" &&
1015+
mkdir script &&
1016+
write_script script/systemctl <<-\EOF &&
1017+
true
1018+
EOF
1019+
10151020
git init repo &&
10161021
: >repo/.git/objects/schedule.lock &&
1017-
test_must_fail git -C repo maintenance start 2>err &&
1022+
test_must_fail env PATH="$PWD/script:$PATH" git -C repo maintenance start --scheduler=systemd 2>err &&
10181023
test_grep "Another scheduled git-maintenance(1) process seems to be running" err
10191024
'
10201025

0 commit comments

Comments
 (0)