A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move some of the file mgmt logic out of the storage model
[simgrid.git]
/
tools
/
git-hooks
/
clang-format.pre-commit
diff --git
a/tools/git-hooks/clang-format.pre-commit
b/tools/git-hooks/clang-format.pre-commit
index
9a6678b
..
db2e47a
100755
(executable)
--- a/
tools/git-hooks/clang-format.pre-commit
+++ b/
tools/git-hooks/clang-format.pre-commit
@@
-149,7
+149,9
@@
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'.
# +++ - 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 "$file" >> "$patch"
+ git ${GIT_SUBCOMMAND} --binary ${CLANG_FORMAT} --diff -q "$file" \
+ | (grep -v "no modified files to format"||true) \
+ >> "$patch"
#"$CLANG_FORMAT" -style=file "$file" | \
#diff -u "$file" - | \
#sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch"
#"$CLANG_FORMAT" -style=file "$file" | \
#diff -u "$file" - | \
#sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch"