summaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
authorPierre-Aime AGNEL <pierre-aime.agnel@scilab-enterprises.com>2016-07-25 16:55:38 +0200
committerPierre-Aime AGNEL <pierre-aime.agnel@scilab-enterprises.com>2016-09-28 16:29:59 +0200
commit600c8c0bde0167a84d6b9cf50b4ef3916d0c26cc (patch)
tree29628417c0365e0141572299acb18e6f798faa66 /git_hooks
parentf2770d67cd2d153d795350aa66f653e015686ae2 (diff)
downloadscilab-600c8c0bde0167a84d6b9cf50b4ef3916d0c26cc.zip
scilab-600c8c0bde0167a84d6b9cf50b4ef3916d0c26cc.tar.gz
modified hooks to remove trailing whitespaces for help files
Change-Id: I9763d62ddc9d4f9984743d07000ea0e8d0b8a0af
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit3
1 files changed, 3 insertions, 0 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 5aaab76..3de975b 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -134,6 +134,9 @@ __indent_xml() {
134 134
135 echo "Formatting" "$FILES" 135 echo "Formatting" "$FILES"
136 "$XMLINDENT" -w -i 4 $FILES || return 2; 136 "$XMLINDENT" -w -i 4 $FILES || return 2;
137 # xmlindent does not remove trailing whitespaces
138 # and might add some on empty lines
139 sed -i -e 's/[ \t]*$//' $FILES || return 2;
137 git add $FILES || return 3; 140 git add $FILES || return 3;
138} 141}
139 142