Page MenuHomePhabricator

[docs] use git diff instead of git format-patch

Authored by AlexanderLanin on Jan 7 2020, 4:07 PM.



Uploading output from git format-patch fails when version has more than 2 dots, e.g. git version which is currently recommended by e.g. GitExtensions or 2.24.1.rc on linux.

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    .. _``:
        2319    .. _Code Repository Browser:
        2320    .. _Arcanist Quick Start:
        2321    .. _Arcanist User Guide:
        2322    .. _llvm-reviews GitHub project:
>>>     2323   -- 

Diff Detail

Event Timeline

AlexanderLanin created this revision.Jan 7 2020, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2020, 4:07 PM

The only difference is the git version in the end:

The only difference is the git version in the end:

I previously reported this here:

I guess it's not so easy to fix as you reported this 1,5 years ago. That's an even better reason to update the documentation to work around the issue.

Hi, could anyone provide feedback here?
Windows and RC Versions of git do not work with format-patch.

Maybe that's not the majority of users that are affected, but still.
For me it was relevant since I use Windows GitExtensions for the GUI + WSL for the rest.
I personally see more and more people using similar setups.

AlexanderLanin edited the summary of this revision. (Show Details)Feb 1 2020, 1:20 PM
probinson accepted this revision.Tue, Mar 10, 6:44 AM
probinson added a subscriber: probinson.

I normally use git diff even on Linux. If someone comes up with a reason why format-patch is better for generating a diff for Phab, they can add it back in.


While you're here, please delete the svn line.

This revision is now accepted and ready to land.Tue, Mar 10, 6:44 AM

Rebased. Solves the svn issue as it's gone in the meantime.

Could someone commit this as I cannot?
Alexander Lanin <>