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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-03 09:02:41 +00:00
1 parent 5c6a46c534
commit d00794b505
1 file changed
+3 -1
+3 -1
View File
@@ -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);