[llvm-dev] Applying patches from Phabricator?

Alexandre Ganea via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 9 07:30:04 PDT 2020


Hello,

Is there a way for Phabricator to retain the patches as originally uploaded?
When using the "Download Raw Diff" button, it seems Phabricator reformats the patch, loosing the parent commit along the way, so often patches don't apply.

The following works, because I've got the latest checkout on master, and the patch was rebased recently:

F:\llvm-project>curl https://reviews.llvm.org/D77421?download=true -L >patch.txt

F:\llvm-project>git apply -3 patch.txt

But if I switch to the release branch and try to apply:

F:\llvm-project>git reset && git checkout .
(...)

F:\llvm-project>git checkout release/10.x
(...)

F:\llvm-project>git apply -3 patch.txt
error: patch failed: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529
error: repository lacks the necessary blob to fall back on 3-way merge.
error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply

Is there some magic I'm not aware of?

Thanks!
Alex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/35b3e032/attachment.html>


More information about the llvm-dev mailing list