diff --git a/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt b/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt index 607874ae..00f3878a 100644 --- a/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt +++ b/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt @@ -80,7 +80,7 @@ internal fun generateGitHook( echo "${'$'}CHANGED_FILES" diff=.git/unstaged-ktlint-git-hook.diff - git diff --color=never > ${'$'}diff + git diff --binary --color=never > ${'$'}diff if [ -s ${'$'}diff ]; then git apply -R ${'$'}diff fi