[PATCH] D72374: [docs] use git diff instead of git format-patch
Alexander Lanin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 16:09:39 PST 2020
AlexanderLanin created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
git format-patch works fine in git version 2.17.1, but not in e.g. git version 2.24.1.windows.2 which is currently recommended by e.g. GitExtensions
In the later case Phabricator complains with:
> Diff Parse Exception: Expected a hunk header, like 'Index: /path/to/file.ext' (svn), 'Property changes on: /path/to/file.ext' (svn properties), 'commit 59bcc3ad6775562f845953cf01624225' (git show), 'diff --git' (git diff), '--- filename' (unified diff), or 'diff -r' (hg diff or patch).
>
> 2318 .. _`https://reviews.llvm.org`: https://reviews.llvm.org
> 2319 .. _Code Repository Browser: https://reviews.llvm.org/diffusion/
> 2320 .. _Arcanist Quick Start: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/
> 2321 .. _Arcanist User Guide: https://secure.phabricator.com/book/phabricator/article/arcanist/
> 2322 .. _llvm-reviews GitHub project: https://github.com/r4nt/llvm-reviews/
> >>> 2323 --
> 2324 2.24.1.windows.2
> 2325
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72374
Files:
llvm/docs/DeveloperPolicy.rst
llvm/docs/GettingStarted.rst
llvm/docs/Phabricator.rst
Index: llvm/docs/Phabricator.rst
===================================================================
--- llvm/docs/Phabricator.rst
+++ llvm/docs/Phabricator.rst
@@ -59,7 +59,8 @@
to upload your patch):
* ``git show HEAD -U999999 > mypatch.patch``
-* ``git format-patch -U999999 @{u}``
+* ``git diff -U999999 @{u} > mypatch.patch``
+* ``git diff HEAD~1 -U999999 > mypatch.patch``
* ``svn diff --diff-cmd=diff -x -U999999``
Before uploading your patch, please make sure it is formatted properly, as
Index: llvm/docs/GettingStarted.rst
===================================================================
--- llvm/docs/GettingStarted.rst
+++ llvm/docs/GettingStarted.rst
@@ -448,8 +448,8 @@
You'll generally want to make sure your branch has a single commit,
corresponding to the review you wish to send, up-to-date with the upstream
``origin/master`` branch, and doesn't contain merges. Once you have that, you
-can use ``git show`` or ``git format-patch`` to output the diff, and attach it
-to a Phabricator review (or to an email message).
+can start `a Phabricator review <Phabricator.html>`_ (or use ``git show`` or
+``git format-patch`` to output the diff, and attach it to an email message).
However, using the "Arcanist" tool is often easier. After `installing
arcanist`_, you can upload the latest commit using:
Index: llvm/docs/DeveloperPolicy.rst
===================================================================
--- llvm/docs/DeveloperPolicy.rst
+++ llvm/docs/DeveloperPolicy.rst
@@ -89,7 +89,9 @@
patches may not apply correctly if the underlying code changes between the
time the patch was created and the time it is applied.
-#. Patches should be made with ``git format-patch``, or similar. If you use a
+#. Patches should be made with ``git format-patch``, or similar (see special
+ commands for `Requesting Phabricator review via the web interface
+ <Phabricator.html#phabricator-request-review-web>`_ ). If you use a
different tool, make sure it uses the ``diff -u`` format and that it
doesn't contain clutter which makes it hard to read.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72374.236713.patch
Type: text/x-patch
Size: 2094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200108/3dceb07e/attachment.bin>
More information about the llvm-commits
mailing list