diff --git a/.github/workflows/code-formatting.yml b/.github/workflows/code-formatting.yml index c679997179edb..9ed7d01b9cae5 100644 --- a/.github/workflows/code-formatting.yml +++ b/.github/workflows/code-formatting.yml @@ -47,7 +47,7 @@ jobs: # the branch we are merging into. BASE_COMMIT=$(git merge-base HEAD ${{ github.event.pull_request.base.sha }}) echo "Running clang-format against branch ${{ github.event.pull_request.base.ref }}, with hash ${{ github.event.pull_request.base.sha }}" - COMMIT_FILES=$(git diff --name-only $BASE_COMMIT | grep -ivE 'LinkDef|Utilities/PCG/') + COMMIT_FILES=$(git diff --diff-filter d --name-only $BASE_COMMIT | grep -ivE 'LinkDef|Utilities/PCG/') [ "X$COMMIT_FILES" = X ] && { echo "No files to check" ; exit 0; } RESULT_OUTPUT="$(git-clang-format --commit $BASE_COMMIT --diff --style file $COMMIT_FILES)"