This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] State where clang-format-diff.py should be run from
ClosedPublic

Authored by DavidSpickett on Nov 19 2020, 8:31 AM.

Details

Summary

At least with git, file paths in a diff will be relative
to the repo root. So if you are in "llvm-project/lldb"
and the diff shows "clang/foo" modified you get:
No such file or directory

From clang-format-diff.py, since clang-format was
asked to read:
llvm-project/lldb/clang/foo

Add a note to the docs to explain this.

(there is git diff --relative but that excludes
changes outside of the current dir)

Diff Detail

Event Timeline

DavidSpickett created this revision.Nov 19 2020, 8:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2020, 8:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
DavidSpickett requested review of this revision.Nov 19 2020, 8:31 AM
sylvestre.ledru accepted this revision.Nov 28 2020, 5:39 AM
This revision is now accepted and ready to land.Nov 28 2020, 5:39 AM
This revision was landed with ongoing or failed builds.Nov 30 2020, 2:00 AM
This revision was automatically updated to reflect the committed changes.