Skip to content

Commit

Permalink
Add --binary when creating patch for unstaged files
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamBorland authored and JLLeitschuh committed Mar 31, 2023
1 parent 8338219 commit cb16647
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb16647

Please sign in to comment.