'\" t .\" Title: rediff .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 13 May 2002 .\" Manual: Man pages .\" Source: patchutils .\" Language: English .\" .TH "REDIFF" "1" "13 May 2002" "patchutils" "Man pages" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" rediff, editdiff \- fix offsets and counts of a hand\-edited diff .SH "SYNOPSIS" .HP \w'\fBrediff\fR\ 'u \fBrediff\fR \fIORIGINAL\fR \fIEDITED\fR .HP \w'\fBrediff\fR\ 'u \fBrediff\fR \fIEDITED\fR .HP \w'\fBrediff\fR\ 'u \fBrediff\fR {[\-\-help] | [\-\-version]} .HP \w'\fBeditdiff\fR\ 'u \fBeditdiff\fR \fIFILE\fR .HP \w'\fBeditdiff\fR\ 'u \fBeditdiff\fR {[\-\-help] | [\-\-version]} .SH "DESCRIPTION" .PP You can use rediff to correct a hand\-edited unified diff\&. Take a copy of the diff you want to edit, and edit it without changing any offsets or counts (the lines that begin \(lq@@\(rq)\&. Then run rediff, telling it the name of the original diff file and the name of the one you have edited, and it will output the edited diff file but with corrected offsets and counts\&. .PP A small script, editdiff, is provided for editing a diff file in\-place\&. .PP The types of changes that are currently handled are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Modifying the text of any file content line (of course)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Adding new line insertions or deletions\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Adding, changing or removing context lines\&. Lines at the context horizon are dealt with by adjusting the offset and/or count\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Adding a single hunk (@@\-prefixed section)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Removing multiple hunk (@@\-prefixed sections)\&. .RE .PP 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 \fBrecountdiff\fR(1) for more information\&. .SH "OPTIONS" .PP \fB\-\-help\fR .RS 4 Display a short usage message\&. .RE .PP \fB\-\-version\fR .RS 4 Display the version number of rediff\&. .RE .SH "SEE ALSO" .PP \fBinterdiff\fR(1), \fBrecountdiff\fR(1) .SH "AUTHOR" .PP \fBTim Waugh\fR <\&twaugh@redhat.com\&> .RS 4 Package maintainer .RE