diff --git a/e2e/__tests__/jestChangedFiles.test.ts b/e2e/__tests__/jestChangedFiles.test.ts index 52f32931017f..dc85fec1f983 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 196b5b2c611b..c7147a004697 100644 --- a/packages/jest-changed-files/src/hg.ts +++ b/packages/jest-changed-files/src/hg.ts @@ -20,7 +20,8 @@ const adapter: SCMAdapter = { const args = ['status', '-amnu']; if (options && options.withAncestor) { - args.push('--rev', 'min((not public() and ancestors(.))^ or .^)'); + // args.push('--rev', 'min((not public() and ancestors(.))^ or .^)'); + args.push('--rev', 'min((!public() & ::.)+.)^1'); } else if (options && options.changedSince) { args.push('--rev', `ancestor(., ${options.changedSince})`); } else if (options && options.lastCommit === true) {