PatchViewer Help

Configuring patch file parsing options

Parsing options

By default, PatchViewer assumes patch files contain only patch file data.

However, some toolchains generate patch files that contain other data that is not strictly patch data. For example, if you ask Github to generate a patch file it will intersperse pull request details between patch file data. (Here's an example.)

When PatchViewer attempts to parse such patch files, it will by default generate error messages. To avoid such error messages you can select the Ignore non-diff text between file diffs during parsing checkbox.

This tells PatchViewer to be lenient and ignore non-patch data in between the diff data for different files within the patch file. It is recommended to leave this option off to ensure better error detection if you know your patch files contain strictly only patch data.

Github patch support

PatchViewer can be used to view the output from a Github 'compare' operation.

  1. First, ensure that the Ignore non-diff text between file diffs during parsing preferences is set, as described in the above section.

  2. After you have compared two Github commits in your web browser (Github help page) you may be viewing a URL such as:

  3. By appending .patch to the URL, Github will generate a patch file:

  4. The output from this URL can then be piped into PatchViewer. For example:

    curl -s -N -L https://github.com/ReactiveCocoa/ReactiveCocoa/compare/v4.0.0...v4.0.1.patch | PatchViewer.app/Contents/MacOS/PatchViewer