Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove attribute content_type of <storage_type>: was never used
[simgrid.git] / tools / git-hooks / clang-format.pre-commit
index fdedc56..9a6678b 100755 (executable)
@@ -149,7 +149,7 @@ do
     #    +++ - timestamp
     # to both lines working on the same file and having a a/ and b/ prefix.
     # Else it can not be applied with 'git apply'.
-    git ${GIT_SUBCOMMAND} --binary ${CLANG_FORMAT} --diff -q >> "$patch"
+    git ${GIT_SUBCOMMAND} --binary ${CLANG_FORMAT} --diff -q "$file" >> "$patch"
     #"$CLANG_FORMAT" -style=file "$file" | \
         #diff -u "$file" - | \
         #sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch"