From 346bf6116613a76df1f0022aae4a302ece4e935c Mon Sep 17 00:00:00 2001 From: CRT Date: Wed, 14 Oct 2026 05:26:14 +0800 Subject: [PATCH] pitfalls dry-run guard: cli/lib/git-ignore.ts's dry branch returns the planned .gitignore line (the plan, printed by its callers), allowed with the reason --- tests/pitfalls.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/pitfalls.test.ts b/tests/pitfalls.test.ts index 52a5369..1d2ba3e 100644 --- a/tests/pitfalls.test.ts +++ b/tests/pitfalls.test.ts @@ -149,7 +149,10 @@ describe('dry runs show a plan, not a count', () => { }); // TODO: remove each entry once its branch lands (the test fails on a stale entry). - const ALLOW: Record = {}; + const ALLOW: Record = { + // the dry branch returns the .gitignore line it would add (the plan itself); the callers print it + 'cli/lib/git-ignore.ts': 'returns the planned .gitignore line', + }; test('no write command in cli/** leaves its --dry branch after printing only a count', () => { const root = join(import.meta.dir, '..'); const flagged: string[] = [];