[all-commits] [llvm/llvm-project] 0bd6be: [gn build] Fix sync script on renames like "Foo.cp...
Nico Weber via All-commits
all-commits at lists.llvm.org
Thu Feb 13 06:26:56 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0bd6be9c3da8024b4f01218afcbf6c17618066ec
https://github.com/llvm/llvm-project/commit/0bd6be9c3da8024b4f01218afcbf6c17618066ec
Author: Nico Weber <thakis at chromium.org>
Date: 2020-02-13 (Thu, 13 Feb 2020)
Changed paths:
M llvm/utils/gn/build/sync_source_lists_from_cmake.py
Log Message:
-----------
[gn build] Fix sync script on renames like "Foo.cpp" -> "LLVMFoo.cpp"
Before, the script used `git log -SFoo.cpp` to find a commit where
the number of occurrences of "Foo.cpp" changed -- but since
a patch with
+ LLVMFoo.cpp
- Foo.cpp
contains the same number of instances of "Foo.cpp", the script
incorrectly skipped this type of rename.
As fix, look for '\bFoo\.cpp\b' instead and pass --pickaxe-regex
so that we can grep for word boundaries.
To test, check out 7531a5039fd (which renamed in llvm/lib/IR
RemarkStreamer.cpp to LLVMRemarkStreamer.cpp) and look at the output of
the script. Before this change, it correctly assigned the addition
of LLVMRemarkStreamer.cpp to 7531a5039fd but incorrectly assigned
the removal of RemarkStreamer.cpp to b8a847c. With this, it
correctly assigns both to 7531a5039fd.
More information about the All-commits
mailing list