From 47cf4bd860189b4dd040f0e7969b6d95e9e474ad Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Mon, 29 Dec 2025 13:45:55 +0100 Subject: [PATCH] Don't run on untracked files. --- bin/clang-format-fix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/clang-format-fix b/bin/clang-format-fix index 21a2547..92a4051 100755 --- a/bin/clang-format-fix +++ b/bin/clang-format-fix @@ -10,9 +10,8 @@ if [[ "$1" == "-g" ]]; then # Use 'git ls-files' to get a list of all files with pending changes: # --modified: files tracked by git that have been modified (staged or unstaged) - # --others: untracked files # --exclude-standard: ignores files in .gitignore - git ls-files --modified --others --exclude-standard \ + git ls-files --modified --exclude-standard \ | grep -E '\.(c|cpp|h|hpp)$' \ | xargs -r clang-format $STYLE_ARGS