{
    "mode": "man",
    "parameter": "rediff",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/rediff/1/json",
    "generated": "2026-09-01T12:21:00Z",
    "synopsis": "rediff ORIGINAL EDITED\nrediff EDITED\nrediff {[--help] | [--version]}\neditdiff FILE\neditdiff {[--help] | [--version]}",
    "sections": {
        "NAME": {
            "content": "rediff, editdiff - fix offsets and counts of a hand-edited diff\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "rediff ORIGINAL EDITED\n\nrediff EDITED\n\nrediff {[--help] | [--version]}\n\neditdiff FILE\n\neditdiff {[--help] | [--version]}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "You can use rediff to correct a hand-edited unified diff. Take a copy of the diff you want to\nedit, and edit it without changing any offsets or counts (the lines that begin “@@”). Then\nrun rediff, telling it the name of the original diff file and the name of the one you have\nedited, and it will output the edited diff file but with corrected offsets and counts.\n\nA small script, editdiff, is provided for editing a diff file in-place.\n\nThe types of changes that are currently handled are:\n\n•   Modifying the text of any file content line (of course).\n\n•   Adding new line insertions or deletions.\n\n•   Adding, changing or removing context lines. Lines at the context horizon are dealt with\nby adjusting the offset and/or count.\n\n•   Adding a single hunk (@@-prefixed section).\n\n•   Removing multiple hunk (@@-prefixed sections).\n\nAlternatively, if only one argument is provided, it is taken to be the edited file and the\ncounts and offsets are adjusted as appropriate. Some assumptions are made when used in this\nmode. See recountdiff(1) for more information.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--help",
                    "content": "Display a short usage message.\n",
                    "long": "--help"
                },
                {
                    "name": "--version",
                    "content": "Display the version number of rediff.\n",
                    "long": "--version"
                }
            ]
        },
        "SEE ALSO": {
            "content": "interdiff(1), recountdiff(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Tim Waugh <twaugh@redhat.com>\nPackage maintainer\n\npatchutils                                   13 May 2002                                   REDIFF(1)",
            "subsections": []
        }
    },
    "summary": "rediff, editdiff - fix offsets and counts of a hand-edited diff",
    "flags": [
        {
            "flag": "",
            "long": "--help",
            "arg": null,
            "description": "Display a short usage message."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Display the version number of rediff."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "interdiff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/interdiff/1/json"
        },
        {
            "name": "recountdiff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/recountdiff/1/json"
        }
    ]
}