summaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab-enterprises.com>2012-08-13 16:13:52 +0200
committercodereview <codereview@git.scilab.org>2012-08-20 12:02:52 +0200
commit67e5341a86d18606753b72e4ee37993f6535a35b (patch)
treea2b8e2b96d5e1505f37d9ac0df37fe0da410bef9 /git_hooks
parenta065d091c330fec18f740a855dc885a85457e9be (diff)
downloadscilab-67e5341a86d18606753b72e4ee37993f6535a35b.zip
scilab-67e5341a86d18606753b72e4ee37993f6535a35b.tar.gz
xmlindent: Work inline. Avoid some race conditions (files being modified after the git commit)
Change-Id: I93243c8df2f4dd7a49c5e79f71dff992bcab3116
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit4
1 files changed, 2 insertions, 2 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 7b1528d..0a38b4a 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -11,7 +11,7 @@ if test -d ".git/rebase-merge" || \
11 test -d ".git/rebase-apply" || \ 11 test -d ".git/rebase-apply" || \
12 test -f ".git/MERGE_HEAD" || \ 12 test -f ".git/MERGE_HEAD" || \
13 test -f ".git/CHERRY_PICK_HEAD" || \ 13 test -f ".git/CHERRY_PICK_HEAD" || \
14 test -f ".git/BISECT_LOG" 14 test -f ".git/BISECT_LOG"
15then 15then
16 exit 0 16 exit 0
17fi 17fi
@@ -140,7 +140,7 @@ __indent_xml() {
140 fi 140 fi
141 141
142 echo "Formatting" $file 142 echo "Formatting" $file
143 "$XMLINDENT" -i 4 -o "$file" "$file" || return 4; 143 "$XMLINDENT" -w -i 4 "$file" || return 4;
144 git add "$file" || return 5; 144 git add "$file" || return 5;
145} 145}
146 146