repo.or.cz
/
coreboot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
mb/dell/snb_ivb_latitude/*/hda_verb.c: Use AZALIA_PIN_DESC macro
[coreboot.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