[PATCH] D79054: [NFC] Improve doc string to mention that paths in diff are used as-is

Christopher Tetreault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 15:20:35 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5a77b958e250: [NFC] Improve doc string to mention that paths in diff are used as-is (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79054/new/

https://reviews.llvm.org/D79054

Files:
  clang/tools/clang-format/clang-format-diff.py


Index: clang/tools/clang-format/clang-format-diff.py
===================================================================
--- clang/tools/clang-format/clang-format-diff.py
+++ clang/tools/clang-format/clang-format-diff.py
@@ -13,9 +13,13 @@
 lines. This is useful to reformat all the lines touched by a specific patch.
 Example usage for git/svn users:
 
-  git diff -U0 --no-color HEAD^ | clang-format-diff.py -p1 -i
+  git diff -U0 --no-color --relative HEAD^ | clang-format-diff.py -p1 -i
   svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
 
+It should be noted that the filename contained in the diff is used unmodified
+to determine the source file to update. Users calling this script directly
+should be careful to ensure that the path in the diff is correct relative to the
+current working directory.
 """
 from __future__ import absolute_import, division, print_function
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79054.262492.patch
Type: text/x-patch
Size: 891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200506/edd7170b/attachment-0001.bin>


More information about the cfe-commits mailing list