diff options
author | Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> | 2012-08-13 16:13:52 +0200 |
---|---|---|
committer | codereview <codereview@git.scilab.org> | 2012-08-20 12:02:52 +0200 |
commit | 67e5341a86d18606753b72e4ee37993f6535a35b (patch) | |
tree | a2b8e2b96d5e1505f37d9ac0df37fe0da410bef9 /git_hooks/pre-commit | |
parent | a065d091c330fec18f740a855dc885a85457e9be (diff) | |
download | scilab-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/pre-commit')
-rwxr-xr-x | git_hooks/pre-commit | 4 |
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" |
15 | then | 15 | then |
16 | exit 0 | 16 | exit 0 |
17 | fi | 17 | fi |
@@ -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 | ||