Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/functions/git-diff.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ test('executes gitDiff by using the git binary', async () => {
'🧮 total detected files changed (json diff): 5'
)
expect(debugMock).toHaveBeenCalledWith(
'running git diff command: git --no-pager diff --no-color --full-index HEAD^1 .'
'running git diff command: git --no-pager diff --no-color --full-index HEAD^1 -- .'
)
})

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/functions/git-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function gitDiff() {
}

// --no-pager ensures that the git command does not use a pager (like less) to display the diff
const gitDiffCmd = `git --no-pager diff ${gitOptions} ${baseBranch} ${searchPath}`
const gitDiffCmd = `git --no-pager diff ${gitOptions} ${baseBranch} -- ${searchPath}`
core.debug(`running git diff command: ${gitDiffCmd}`)
const {stdout, stderr} = await execAsync(gitDiffCmd, {
maxBuffer: maxBufferSize
Expand Down