{
    "mode": "man",
    "parameter": "interdiff",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/interdiff/1/json",
    "generated": "2026-06-10T16:01:17Z",
    "synopsis": "interdiff [[-p n] | [--strip-match=n]] [[-U n] | [--unified=n]] [[-d PAT] |\n[--drop-context=PAT]] [[-q] | [--quiet]] [[-z] | [--decompress]] [[-b] |\n[--ignore-space-change]] [[-B] | [--ignore-blank-lines]] [[-i] | [--ignore-case]]\n[[-w] | [--ignore-all-space]] [[--interpolate] | [--combine] | [--flip]]\n[--no-revert-omitted] diff1 diff2\ninterdiff {[--help] | [--version]}",
    "sections": {
        "NAME": {
            "content": "interdiff - show differences between two diff files\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "interdiff [[-p n] | [--strip-match=n]] [[-U n] | [--unified=n]] [[-d PAT] |\n[--drop-context=PAT]] [[-q] | [--quiet]] [[-z] | [--decompress]] [[-b] |\n[--ignore-space-change]] [[-B] | [--ignore-blank-lines]] [[-i] | [--ignore-case]]\n[[-w] | [--ignore-all-space]] [[--interpolate] | [--combine] | [--flip]]\n[--no-revert-omitted] diff1 diff2\n\ninterdiff {[--help] | [--version]}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "interdiff creates a unified format diff that expresses the difference between two diffs. The\ndiffs must both be relative to the same files. For best results, the diffs must have at least\nthree lines of context.\n\nTo reverse a patch, use /dev/null for diff2.\n\nTo reduce the amount of context in a patch, use:\n\ninterdiff -U1 /dev/null patchfile\n\nSince interdiff doesn't have the advantage of being able to look at the files that are to be\nmodified, it has stricter requirements on the input format than patch(1) does. The output of\nGNU diff will be okay, even with extensions, but if you intend to use a hand-edited patch it\nmight be wise to clean up the offsets and counts using recountdiff(1) first.\n\nNote, however, that the two patches must both be relative to the versions of the same\noriginal set of files.\n\nThe diffs may be in context format. The output, however, will be in unified format.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h",
                    "content": "Ignored, for compatibility with older versions of interdiff. This option will go away\nsoon.\n",
                    "flag": "-h"
                },
                {
                    "name": "-p --strip-match=",
                    "content": "When comparing filenames, ignore the first n pathname components from both patches. (This\nis similar to the -p option to GNU patch(1).)\n",
                    "flag": "-p"
                },
                {
                    "name": "-q --quiet",
                    "content": "Quieter output. Don't emit rationale lines at the beginning of each patch.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-U --unified=",
                    "content": "Attempt to display n lines of context (requires at least n lines of context in both input\nfiles). (This is similar to the -U option to GNU diff(1).)\n",
                    "flag": "-U"
                },
                {
                    "name": "-d --drop-context=",
                    "content": "Don't display any context on files that match the shell wildcard PATTERN. This option can\nbe given multiple times.\n\nNote that the interpretation of the shell wildcard pattern does not count slash\ncharacters or periods as special (in other words, no flags are given to fnmatch). This is\nso that “*/basename”-type patterns can be given without limiting the number of pathname\ncomponents.\n",
                    "flag": "-d"
                },
                {
                    "name": "-i --ignore-case",
                    "content": "Consider upper- and lower-case to be the same.\n",
                    "flag": "-i",
                    "long": "--ignore-case"
                },
                {
                    "name": "-w --ignore-all-space",
                    "content": "Ignore whitespace changes in patches.\n",
                    "flag": "-w",
                    "long": "--ignore-all-space"
                },
                {
                    "name": "-b --ignore-space-change",
                    "content": "Ignore changes in the amount of whitespace.\n",
                    "flag": "-b",
                    "long": "--ignore-space-change"
                },
                {
                    "name": "-B --ignore-blank-lines",
                    "content": "Ignore changes whose lines are all blank.\n",
                    "flag": "-B",
                    "long": "--ignore-blank-lines"
                },
                {
                    "name": "-z --decompress",
                    "content": "Decompress files with extensions .gz and .bz2.\n",
                    "flag": "-z",
                    "long": "--decompress"
                },
                {
                    "name": "--interpolate",
                    "content": "Run as “interdiff”. This is the default.\n",
                    "long": "--interpolate"
                },
                {
                    "name": "--combine",
                    "content": "Run as “combinediff”. See combinediff(1) for more information about how the behaviour is\naltered in this mode.\n",
                    "long": "--combine"
                },
                {
                    "name": "--no-revert-omitted",
                    "content": "(For interpolation mode only) When a file is changed by the first patch but not by the\nsecond, don't revert that change.\n",
                    "long": "--no-revert-omitted"
                },
                {
                    "name": "--help",
                    "content": "Display a short usage message.\n",
                    "long": "--help"
                },
                {
                    "name": "--version",
                    "content": "Display the version number of interdiff.\n",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Basic usage:\n\ninterdiff -z 3.2pre1.patch.gz 3.2pre2.patch.gz\n\nReversing a patch:\n\ninterdiff patch /dev/null\n\nReversing part of a patch (and ignoring the rest):\n\nfilterdiff -i file.c patchfile | \\\ninterdiff /dev/stdin /dev/null\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There are currently no known bugs in interdiff; but there are some caveats. If you find a\nbug, please report it (along with a minimal test case) to Tim Waugh <twaugh@redhat.com>.\n\nThere are some sets of patches in which there is just not enough information to produce a\nproper interdiff. In this case, the strategy employed is to revert the original patch and\napply the new patch. This, unfortunately, means that interdiffs are not guaranteed to be\nreversible.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "combinediff(1)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Tim Waugh <twaugh@redhat.com>\nPackage maintainer\n\nMichael K. Johnson <johnsonm@redhat.com>\nOriginal man page contributor\n\n\n\npatchutils                                  23 June 2009                                INTERDIFF(1)",
            "subsections": []
        }
    },
    "summary": "interdiff - show differences between two diff files",
    "flags": [
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": "Ignored, for compatibility with older versions of interdiff. This option will go away soon."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "When comparing filenames, ignore the first n pathname components from both patches. (This is similar to the -p option to GNU patch(1).)"
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Quieter output. Don't emit rationale lines at the beginning of each patch."
        },
        {
            "flag": "-U",
            "long": null,
            "arg": null,
            "description": "Attempt to display n lines of context (requires at least n lines of context in both input files). (This is similar to the -U option to GNU diff(1).)"
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "Don't display any context on files that match the shell wildcard PATTERN. This option can be given multiple times. Note that the interpretation of the shell wildcard pattern does not count slash characters or periods as special (in other words, no flags are given to fnmatch). This is so that “*/basename”-type patterns can be given without limiting the number of pathname components."
        },
        {
            "flag": "-i",
            "long": "--ignore-case",
            "arg": null,
            "description": "Consider upper- and lower-case to be the same."
        },
        {
            "flag": "-w",
            "long": "--ignore-all-space",
            "arg": null,
            "description": "Ignore whitespace changes in patches."
        },
        {
            "flag": "-b",
            "long": "--ignore-space-change",
            "arg": null,
            "description": "Ignore changes in the amount of whitespace."
        },
        {
            "flag": "-B",
            "long": "--ignore-blank-lines",
            "arg": null,
            "description": "Ignore changes whose lines are all blank."
        },
        {
            "flag": "-z",
            "long": "--decompress",
            "arg": null,
            "description": "Decompress files with extensions .gz and .bz2."
        },
        {
            "flag": "",
            "long": "--interpolate",
            "arg": null,
            "description": "Run as “interdiff”. This is the default."
        },
        {
            "flag": "",
            "long": "--combine",
            "arg": null,
            "description": "Run as “combinediff”. See combinediff(1) for more information about how the behaviour is altered in this mode."
        },
        {
            "flag": "",
            "long": "--no-revert-omitted",
            "arg": null,
            "description": "(For interpolation mode only) When a file is changed by the first patch but not by the second, don't revert that change."
        },
        {
            "flag": "",
            "long": "--help",
            "arg": null,
            "description": "Display a short usage message."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Display the version number of interdiff."
        }
    ],
    "examples": [
        "Basic usage:",
        "interdiff -z 3.2pre1.patch.gz 3.2pre2.patch.gz",
        "Reversing a patch:",
        "interdiff patch /dev/null",
        "Reversing part of a patch (and ignoring the rest):",
        "filterdiff -i file.c patchfile | \\",
        "interdiff /dev/stdin /dev/null"
    ],
    "see_also": [
        {
            "name": "combinediff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/combinediff/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Show differences between two diff files.",
        "examples": [
            {
                "description": "Compare diff files",
                "command": "interdiff {{old_file}} {{new_file}}"
            },
            {
                "description": "Compare diff files, ignoring whitespace",
                "command": "interdiff {{-w|--ignore-all-space}} {{old_file}} {{new_file}}"
            }
        ]
    }
}