DavidSpickett created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
DavidSpickett requested review of this revision.

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)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91799

Files:
  clang/docs/ClangFormat.rst


Index: clang/docs/ClangFormat.rst
===================================================================
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -248,6 +248,9 @@
 The option `-U0` will create a diff without context lines (the script would 
format
 those as well).
 
+These commands use the file paths shown in the diff output
+so they will only work from the root of the repository.
+
 Current State of Clang Format for LLVM
 ======================================
 


Index: clang/docs/ClangFormat.rst
===================================================================
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -248,6 +248,9 @@
 The option `-U0` will create a diff without context lines (the script would format
 those as well).
 
+These commands use the file paths shown in the diff output
+so they will only work from the root of the repository.
+
 Current State of Clang Format for LLVM
 ======================================
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D91799: [clang-form... David Spickett via Phabricator via cfe-commits

Reply via email to