mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[git-tools] Adjusted pre-commit hook to run under freebsd /bin/sh.
This commit is contained in:
parent
5a3ec9901d
commit
9afe2c9b6e
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue