Skip to content

Commit cb16647

Browse files
GrahamBorlandJLLeitschuh
authored andcommitted
Add --binary when creating patch for unstaged files
1 parent 8338219 commit cb16647

File tree

1 file changed

+1
-1
lines changed
  • plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint

1 file changed

+1
-1
lines changed

plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal fun generateGitHook(
8080
echo "${'$'}CHANGED_FILES"
8181
8282
diff=.git/unstaged-ktlint-git-hook.diff
83-
git diff --color=never > ${'$'}diff
83+
git diff --binary --color=never > ${'$'}diff
8484
if [ -s ${'$'}diff ]; then
8585
git apply -R ${'$'}diff
8686
fi

0 commit comments

Comments
 (0)