.\" Generated by scdoc 1.11.4 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "GENDIFF" "1" "2026-03-06" "RPM 6.0.1" .PP .SH NAME gendiff - Utility to aid in error-free diff file generation .PP .SH SYNOPSIS \fBgendiff\fR \fIDIRECTORY\fR \fIDIFF-EXTENSION\fR .PP .SH DESCRIPTION \fBgendiff\fR is a tool for generating a \fIdiff\fR file from a single directory.\& The generated \fIdiff\fR can be applied with the \fBpatch\fR(1) program to recreate the changes.\& .PP \fBgendiff\fR looks for any files with \fIDIFF-EXTENSION\fR as their extension in the specified \fIDIRECTORY\fR, and runs \fBdiff\fR(1) on the files with \fIDIFF-EXTENSION\fR and the counterpart without it, in that order.\& This allows for generating diffs from source code without making a full copy of the directory, which you'\&d otherwise need when using the \fBdiff\fR(1) utility directly.\& .PP \fBgendiff\fR is commonly used to creating patches for the purposes of packaging software with \fBrpmbuild\fR(1).\& .PP .SH ARGUMENTS \fIDIRECTORY\fR .RS 4 The directory to generate a diff from.\& .PP .RE \fIDIFF-EXTENSION\fR .RS 4 The diff extension to look for.\& .PP .RE .SH EXIT STATUS On success, 0 is returned, a nonzero failure code otherwise.\& .PP .SH EXAMPLES Assuming you need to modify a source file called \fIsomefile.\&cpp\fR and have chosen the extension \fIfix\fR, copy it to \fIsomefile.\&cpp.\&fix\fR before editing it.\& Then edit the original file (\fIsomefile.\&cpp\fR).\& .PP After editing all the files you need to edit in this fashion, enter the directory one level above where the source code resides, and run \fBgendiff\fR on it: .PP .nf .RS 4 gendiff myproject-1\&.0 \&.fix > myproject-1\&.0-fix\&.patch .fi .RE .PP .SH SEE ALSO \fBdiff\fR(1), \fBpatch\fR(1)