diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 33eed8c28..db96de16a 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -29,8 +29,11 @@ jobs: old_fname="$(echo -e ${fname})" new_fname="$(echo -e "${fname}" | tr ' ' '_')" new_fname="$(echo -e "${new_fname}" | tr 'A-Z' 'a-z')" - echo "${old_fname} --> ${new_fname}" - git mv ${old_fname} ${new_fname} + if [$old_fname != $new_fname] + then + echo "${old_fname} --> ${new_fname}" + git mv ${old_fname} ${new_fname} + fi done git commit -am "formatting filenames $GITHUB_SHA" || true - name: Clang Formatter