Skip to content

Commit f492852

Browse files
committed
test(rules-git): update worktree linked worktree test to expect allowed result
The linked worktree fixture now has its local git config read directly, so git reset --hard is allowed when the local config is readable and the git binary is not invoked (or unavailable).
1 parent 9902cf6 commit f492852

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/core/rules-git.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ describe('git linked worktree mode', () => {
13111311
chmodSync(fakeGit, 0o755);
13121312
try {
13131313
withEnv({ SAFETY_NET_WORKTREE: '1', PATH: fakeBin }, () => {
1314-
runGuard('git reset --hard', fixture.linkedWorktree);
1314+
expect(runGuard('git reset --hard', fixture.linkedWorktree)).toBeNull();
13151315
});
13161316
expect(existsSync(marker)).toBe(false);
13171317
} finally {

0 commit comments

Comments
 (0)