Skip to content

Commit 9e4d142

Browse files
committed
test: use FETCH_HEAD and checkout to FETCH_HEAD itself first
1 parent 9aa7e89 commit 9e4d142

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dist/index.js

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/get-file-from-branch.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export function getFileFromBranch(
1111
console.log('filePath', filePath)
1212
console.log('offset', offset)
1313
execSync(`git fetch origin ${branch}`)
14-
execSync(`git checkout ${branch} -- ${filePath}`)
15-
execSync(`git checkout HEAD${offset} -- ${filePath}`)
14+
execSync(`git checkout FETCH_HEAD -- ${filePath}`)
15+
execSync(`git checkout FETCH_HEAD${offset} -- ${filePath}`)
16+
// execSync(`git checkout HEAD${offset} -- ${filePath}`)
1617
return readFileSync(filePath)
1718
}

0 commit comments

Comments
 (0)