repo.or.cz
/
coreboot2.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mb/ibm/sbp1: Update PCIe SBDF in comment
[coreboot2.git]
/
util
/
scripts
/
prepare-commit-msg.clang-format
blob
a6b3d08a265b0144c711ffc0ddd5a1781b15c2f1
1
#!/usr/bin/env bash
2
files
=
`git diff --cached --name-only | grep '\.[ch]$'`
3
if
[
-z
"
$files
"
];
then
4
exit
0
5
fi
6
# This has to be set here; otherwise a grep error seems to cause
7
# us to exit with non-zero status.
8
set -e
9
clang-format
-i
$files
10
git add
$files
11
u
=
`git config user.name`
12
m
=
"clang-formatted-by:
$u
"
13
echo
$m
>>
$1