aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-04-28 12:37:36 +0200
committerNils Adermann <naderman@naderman.de>2010-04-28 12:37:36 +0200
commit0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5 (patch)
tree69f7e272ed29689a7d549e05da12858ee927517e /git-tools
parentf8ff68f21d16d583da5c58cef4e961cc226926dd (diff)
parentcb3cf71805246bc2ce3b386a5d70e76dbe1dff0e (diff)
downloadforums-0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5.tar
forums-0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5.tar.gz
forums-0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5.tar.bz2
forums-0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5.tar.xz
forums-0ba247ef0f984ecb088f2b8ce0e114f5b48de6d5.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [git-tools] Use @ instead of : in sed command in pre-commit hook for wider compatibility. [git-tools] Adjusted pre-commit hook to run under freebsd /bin/sh. [git-tools] Changed pre-commit hook to use sh instead of bash [feature/webpi] Web PI supports UNIX line endings so we'll remove them [feature/webpi] Hopefully finally fix this [feature/webpi] Fix messed up line endings [feature/webpi] Add WebPI support to the build script. [feature/webpi] Package files for Microsoft Web Platform Installer [feature/dbal-tests] Remove hardcoded 'mysql' from PDO DSN in DBAL test. [feature/dbal-tests] Fix mysql (not mysqli) dbal test.
Diffstat (limited to 'git-tools')
-rwxr-xr-xgit-tools/hooks/pre-commit9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit
index 23ab8d6cdb..9719b91746 100755
--- a/git-tools/hooks/pre-commit
+++ b/git-tools/hooks/pre-commit
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
#
# A hook to disallow php syntax errors to be committed
# by running php -l (lint) on them. It requires php-cli
@@ -27,7 +27,10 @@ fi
error=0
errors=""
-IFS=$'\n'
+# dash does not support $'\n':
+# http://forum.soft32.com/linux2/Bug-409179-DASH-Settings-IFS-work-properly-ftopict70039.html
+IFS='
+'
# get a list of staged files
for line in $(git diff-index --cached --full-index $against)
do
@@ -59,7 +62,7 @@ do
then
error=1
# Swap back in correct filenames
- errors+=${result//in - on/"$filename"}
+ errors=$(echo "$errors"; echo "$result" |sed -e "s@in - on@in $filename on@g")
fi
done
unset IFS