.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "splitpatch 1" .TH splitpatch 1 2024-02-22 splitpatch 2024-02-22 .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME splitpatch \- split a patch up into files or hunks .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& splitpatch [options] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Divide a patch or diff file into pieces. The split can made by file or by hunk basis. This makes is possible to separate changes that might not be desirable, or assemble a patch into more coherent set of changes. .PP The hunk option makes it possible to compare similar patches on a hunk-by-hunk basis using a tool like \fBinterdiff\fR\|(1) from the patchutils package. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-H, \-\-hunk, \-\-hunks\fR" 4 .IX Item "-H, --hunk, --hunks" Split patch by hunks instead of the default: by file. .IP "\fB\-h, \-\-help\fR" 4 .IX Item "-h, --help" Display help and exit .IP "\fB\-V, \-\-version\fR" 4 .IX Item "-V, --version" Output version information and exit. .SH EXAMPLES .IX Header "EXAMPLES" Have you ever been working on code, gone off on a side tangent and then realized you don't have a patch for the original issue you set out to address? When you run \f(CW\*(C`diff \-u\*(C'\fR or some other diff command, you discover that you have made multiple sets of changes; some you want to submit, others you don't. What you really want to do is break those changes apart and apply only the ones you want. This is where splitpatch comes into play, breaking up the patch by source file: .PP .Vb 1 \& splitpatch changes.patch .Ve .PP Or to split the patch file into individual hunks which can later be applied using the \fBpatch\fR\|(1) command: .PP .Vb 1 \& splitpatch \-\-hunks changes.patch .Ve .SH ENVIRONMENT .IX Header "ENVIRONMENT" None. .SH FILES .IX Header "FILES" The \fB\-\-hunk\fR option writes sequentially numbered files in the current directory named for the source file to be patched followed by the sequence number: \f(CW\*(C`*\-NNN.patch\*(C'\fR. .PP Otherwise, the split patch files are named by the source file being patched. .SH STANDARDS .IX Header "STANDARDS" None. .SH AVAILABILITY .IX Header "AVAILABILITY" https://github.com/benjsc/splitpatch .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdehtmldiff\fR\|(1) \&\fBeditdiff\fR\|(1) \&\fBfilterdiff\fR\|(1) \&\fBfixcvsdiff\fR\|(1) \&\fBflipdiff\fR\|(1) \&\fBgrepdiff\fR\|(1) \&\fBinterdiff\fR\|(1) \&\fBlsdiff\fR\|(1) \&\fBpatch\fR\|(1) \&\fBrecountdiff\fR\|(1) \&\fBrediff\fR\|(1) \&\fBsplitdiff\fR\|(1) \&\fBunwrapdiff\fR\|(1) \&\fBwiggle\fR\|(1) .SH AUTHORS .IX Header "AUTHORS" Program was written by Peter Hutterer , Benjamin Close . Enhancements by Jari Aalto . .PP This manual page was written by Jari Aalto . Released under license GNU GPL version 2 or (at your option) any later version. For more information about the license, visit .