diff --git a/e2e/__tests__/jestChangedFiles.test.ts b/e2e/__tests__/jestChangedFiles.test.ts index 7cc662c4fd97..fbb0c532cfef 100644 --- a/e2e/__tests__/jestChangedFiles.test.ts +++ b/e2e/__tests__/jestChangedFiles.test.ts @@ -47,8 +47,6 @@ function gitCreateBranch(branchName: string, dir: string) { run(`git branch ${branchName}`, dir); } -jest.retryTimes(3); - beforeEach(() => cleanup(DIR)); afterEach(() => cleanup(DIR)); diff --git a/packages/jest-changed-files/src/hg.ts b/packages/jest-changed-files/src/hg.ts index 02f1ea6099cd..20ae92a32dd3 100644 --- a/packages/jest-changed-files/src/hg.ts +++ b/packages/jest-changed-files/src/hg.ts @@ -18,7 +18,9 @@ const adapter: SCMAdapter = { const args = ['status', '-amnu']; if (options.withAncestor) { - args.push('--rev', 'min((!public() & ::.)+.)^'); + // working suggestion + // args.push('--rev', 'min((not public() and ancestors(.))^ or .^)'); + args.push('--rev', 'min((!public() & ::.)+.)^1'); } else if (options.changedSince) { args.push('--rev', `ancestor(., ${options.changedSince})`); } else if (options.lastCommit === true) {