mb/ibm/sbp1: Update PCIe SBDF in comment
[coreboot2.git] / util / scripts / prepare-commit-msg.clang-format
bloba6b3d08a265b0144c711ffc0ddd5a1781b15c2f1
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