From d00794b505d9747e4aa663e9caf91fe51a230509 Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 3 Nov 2026 09:02:41 +0000 Subject: [PATCH] test(restamp-mentions): set the stamp file's exec bit through the index so the mode-change carry case holds on Windows Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/restamp-mentions.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/restamp-mentions.test.ts b/test/restamp-mentions.test.ts index 7bc14c5b2..a74641aa0 100644 --- a/test/restamp-mentions.test.ts +++ b/test/restamp-mentions.test.ts @@ -427,7 +427,9 @@ describe('a branch-added row left at the fork version after the base moved (GST- const { repo, body } = carryAfterStamp('restamp-carry-mode-', [row('1.2.3.0', 'base_row')], row('1.2.3.0', 'mine'), [row('1.2.3.0', 'base_row'), '', row('1.2.5.0', 'mine')]); fs.chmodSync(path.join(repo.work, NOTICE), 0o755); - repo.git('commit', '-qam', 'stamp 1.2.5.0, and make the file executable'); + repo.git('add', '-A'); + repo.git('update-index', '--chmod=+x', '--', NOTICE); + repo.git('commit', '-qm', 'stamp 1.2.5.0, and make the file executable'); expect(repo.git('ls-tree', 'HEAD', '--', NOTICE)).toStartWith('100755 '); const carried = runBin(repo, 'gstack-ship-receipt', ['carry', '--body', body, '--base', 'main']); expect(carried.status, carried.out).toBe(EXIT.refused);