rediff – Unix, Linux Command


rediff – Unix, Linux Command


rediff, editdiff – fix offsets and counts of a hand-edited diff


rediff EDITED
rediff {[–help] [–version]}
editdiff FILE
editdiff {[–help] [–version]}


You can utilize rediff to address a hand-altered brought together diff. Take a duplicate of the diff you need to alter, and alter it without changing any counterbalances or tallies (the lines that start \(lq@@\(rq). At that point run rediff, revealing to it the name of the first diff record and the name of the one you have altered, and it will yield the altered diff document yet with adjusted counterbalances and tallies.

A small script, editdiff, is provided for editing a diff file in-place.

The types of changes that are currently handled are:

oModifying the text of any file content line (of course).
oAdding new line insertions or deletions.
oAdding, changing or removing context lines. Lines at the context horizon are dealt with by adjusting the offset and/or count.
oAdding a single hunk (@@-prefixed section).
oRemoving multiple hunk (@@-prefixed sections).

Alternatively, if only one argument is provided, it is taken to be the edited file and the counts and offsets are adjusted as appropriate. Some assumptions are made when used in this mode. See recountdiff(1) for more information.


–helpDisplay a short usage message.
Display the version number of rediff.