This is an archive of the discontinued LLVM Phabricator instance.

clang-format: Use git-ls-tree to get file mode in diff mode
ClosedPublic

Authored by lhchavez on Nov 3 2016, 12:16 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

lhchavez updated this revision to Diff 76878.Nov 3 2016, 12:16 PM
lhchavez retitled this revision from to clang-format: Use git-ls-tree to get file mode in diff mode.
lhchavez updated this object.
lhchavez added reviewers: djasper, lodato.
lodato accepted this revision.Nov 3 2016, 4:53 PM
lodato edited edge metadata.

Thanks for the fix!

This revision is now accepted and ready to land.Nov 3 2016, 4:53 PM
This revision was automatically updated to reflect the committed changes.