Skip to content

Commit 32adefe

Browse files
authored
Improve file names processing in clang-format.sh
- Process .cc and .hh files. - Ignore empty file list.
1 parent c4222a7 commit 32adefe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/scripts/clang-format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
#----------------------------------------------------------------------------
1010

11-
git diff --name-only --diff-filter=A -C -M develop | grep -e "\.\(c\|h\|hpp\|cpp\)\$" | xargs clang-format -i "$@"
11+
git diff --name-only --diff-filter=A -C -M develop | grep -e "\.\(c\|h\|cc\|hh\|hpp\|cpp\)\$" | xargs -r clang-format -i "$@"

0 commit comments

Comments
 (0)