clang-format: Use git-ls-tree to get file mode in diff mode
Summary:
If a file has been renamed/deleted from the filesystem and --diff mode
with two commits is active, attempting to get the file's mode will fail.
This change uses git-ls-tree instead to get the correct permissions for
the given revision.
Patch by Luis Hector Chavez!
Reviewers: djasper, lodato
Subscribers: srhines, cfe-commits
Differential Revision: https://reviews.llvm.org/D26287
git-svn-id: svn://svn.chromium.org/llvm-project/cfe/trunk/tools/clang-format@286212 0b72dbe1-c17f-4bc7-b9db-2b4152be0356
1 file changed