From a27eecc2629048d25c1cec9a0a867999772e45ec Mon Sep 17 00:00:00 2001 From: joshuasilver Date: Fri, 30 Jul 2010 13:45:44 -0400 Subject: [PATCH 1/2] Added (and enabled) a check-for-dos-endings pre commit hook --- check-for-dos-endings | 25 +++++++++++++++++++++++++ pre-commit | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 check-for-dos-endings diff --git a/check-for-dos-endings b/check-for-dos-endings new file mode 100755 index 0000000..fc8b5d0 --- /dev/null +++ b/check-for-dos-endings @@ -0,0 +1,25 @@ +#!/usr/bin/env php + Date: Fri, 30 Jul 2010 17:45:12 -0400 Subject: [PATCH 2/2] Added a newline --- check-for-dos-endings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-for-dos-endings b/check-for-dos-endings index fc8b5d0..807526c 100755 --- a/check-for-dos-endings +++ b/check-for-dos-endings @@ -11,7 +11,7 @@ $cmd = "grep -PIlsr '\\r\\n' . | grep -v '.git'"; exec($cmd, $output, $return); if ($return != 1) { - echo "DOS line endings detected" . implode("\n", $output); + echo "DOS line endings detected\n" . implode("\n", $output); $exit_status = 1; exit($exit_status); }