Skip to content

Commit 72781b1

Browse files
authored
fixes #1302 danger local to play nice with git config diff.noprefix
1 parent 1e7ee10 commit 72781b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/platforms/git/localGetDiff.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { debug } from "../../debug"
22
import { spawn } from "child_process"
33

44
const d = debug("localGetDiff")
5-
const useCommittedDiffArgs = (base: string, head: string) => ["diff", `${base}...${head}`]
6-
const useStagingChanges = (base: string) => ["diff", base]
5+
const useCommittedDiffArgs = (base: string, head: string) => ["diff", "--src-prefix='a/' --dst-prefix='b/'", `${base}...${head}`]
6+
const useStagingChanges = (base: string) => ["diff", "--src-prefix='a/' --dst-prefix='b/'", base]
77
export const localGetDiff = (base: string, head: string, staging: boolean = false) =>
88
new Promise<string>(done => {
99
const args = staging ? useStagingChanges(base) : useCommittedDiffArgs(base, head)

0 commit comments

Comments
 (0)