Is there a way to check if a file in git commit is a symbolic link without checking out the commit content?
Background:
There is a hook which is used to check C++ code formatting in each git commit that is pushed.
So far the algorithm is:
Get a list of files in a commit with git diff-tree --no-commit-id --name-only --diff-filter=d -r ${commit}
.
Processes each file (content) in git commit, selected based on a file extension, using git show ${commit}:${file}
.
Problem:
A file with .cpp
extension may be a symbolic link, in which case it shall not be processed.
NOTE: I know that having source files as a symbolic link is not a good idea.