Debian Codegraph @

upstream/debian-unstable/man1/gendiff.1

raw
1 .\" Generated by scdoc 1.11.4
2 .\" Complete documentation for this program is not available as a GNU info page
3 .ie \n(.g .ds Aq \(aq
4 .el .ds Aq '
5 .nh
6 .ad l
7 .\" Begin generated content:
8 .TH "GENDIFF" "1" "2026-04-10" "RPM 6.0.1"
9 .PP
10 .SH NAME
11 gendiff - Utility to aid in error-free diff file generation
12 .PP
13 .SH SYNOPSIS
14 \fBgendiff\fR \fIDIRECTORY\fR \fIDIFF-EXTENSION\fR
15 .PP
16 .SH DESCRIPTION
17 \fBgendiff\fR is a tool for generating a \fIdiff\fR file from a single directory.\&
18 The generated \fIdiff\fR can be applied with the \fBpatch\fR(1) program to recreate
19 the changes.\&
20 .PP
21 \fBgendiff\fR looks for any files with \fIDIFF-EXTENSION\fR as their extension in the
22 specified \fIDIRECTORY\fR, and runs \fBdiff\fR(1) on the files with \fIDIFF-EXTENSION\fR and
23 the counterpart without it, in that order.\& This allows for generating diffs from
24 source code without making a full copy of the directory, which you'\&d otherwise
25 need when using the \fBdiff\fR(1) utility directly.\&
26 .PP
27 \fBgendiff\fR is commonly used to creating patches for the purposes of
28 packaging software with \fBrpmbuild\fR(1).\&
29 .PP
30 .SH ARGUMENTS
31 \fIDIRECTORY\fR
32 .RS 4
33 The directory to generate a diff from.\&
34 .PP
35 .RE
36 \fIDIFF-EXTENSION\fR
37 .RS 4
38 The diff extension to look for.\&
39 .PP
40 .RE
41 .SH EXIT STATUS
42 On success, 0 is returned, a nonzero failure code otherwise.\&
43 .PP
44 .SH EXAMPLES
45 Assuming you need to modify a source file called \fIsomefile.\&cpp\fR and
46 have chosen the extension \fIfix\fR, copy it to \fIsomefile.\&cpp.\&fix\fR before
47 editing it.\& Then edit the original file (\fIsomefile.\&cpp\fR).\&
48 .PP
49 After editing all the files you need to edit in this fashion, enter the
50 directory one level above where the source code resides, and run
51 \fBgendiff\fR on it:
52 .PP
53 .nf
54 .RS 4
55 gendiff myproject-1\&.0 \&.fix > myproject-1\&.0-fix\&.patch
56 .fi
57 .RE
58 .PP
59 .SH SEE ALSO
60 \fBdiff\fR(1), \fBpatch\fR(1)