xmlindent: Work inline. Avoid some race conditions (files being modified after the... 85/8685/2
Sylvestre Ledru [Mon, 13 Aug 2012 14:13:52 +0000 (16:13 +0200)]
Change-Id: I93243c8df2f4dd7a49c5e79f71dff992bcab3116

git_hooks/pre-commit

index 7b1528d..0a38b4a 100755 (executable)
@@ -11,7 +11,7 @@ if test -d ".git/rebase-merge"          || \
    test -d ".git/rebase-apply"          || \
    test -f ".git/MERGE_HEAD"            || \
    test -f ".git/CHERRY_PICK_HEAD"      || \
-   test -f ".git/BISECT_LOG"            
+   test -f ".git/BISECT_LOG"
 then
     exit 0
 fi
@@ -140,7 +140,7 @@ __indent_xml() {
     fi
 
     echo "Formatting" $file
-    "$XMLINDENT" -i 4 -o "$file" "$file" || return 4;
+    "$XMLINDENT" -w -i 4 "$file" || return 4;
     git add "$file" || return 5;
 }