aboutsummaryrefslogtreecommitdiff
path: root/scripts/tests
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tests')
-rw-r--r--scripts/tests/rename-ai-artifact.bats12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/tests/rename-ai-artifact.bats b/scripts/tests/rename-ai-artifact.bats
index f00c92f..ea7f36e 100644
--- a/scripts/tests/rename-ai-artifact.bats
+++ b/scripts/tests/rename-ai-artifact.bats
@@ -27,7 +27,17 @@ setup() {
printf 'Old session mentioning foo and foo.org — this is history.\n' > "$base/sessions/2026-01-01-old.org"
done
printf 'See foo.org and foo-helper.py. Also foobar.org stays.\n' > "$REPO/notes.org"
- ( cd "$REPO" && git init -q && git add -A && git -c user.email=t@t -c user.name=t commit -qm init )
+ # Disable background auto-maintenance/gc before any git command can arm it:
+ # otherwise a post-commit `git maintenance run --auto` writes into .git after
+ # the test body and races teardown's `rm -rf`, which then fails intermittently
+ # with ".git: Directory not empty". Diagnose-not-mask: kill the writer, don't
+ # retry the rm.
+ ( cd "$REPO" \
+ && git init -q \
+ && git config gc.auto 0 \
+ && git config maintenance.auto false \
+ && git add -A \
+ && git -c user.email=t@t -c user.name=t commit -qm init )
}
teardown() {