.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "git-debrebase 1" .TH git-debrebase 1 "Debian Project" "perl v5.28.1" "git-debrebase" .\" 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" git\-debrebase \- delta queue rebase tool for Debian packaging .SH "SYNOPSYS" .IX Header "SYNOPSYS" .Vb 2 \& git\-debrebase [] [\-\- ] \& git\-debrebase [] [ .Ve .SH "INTRODUCTION" .IX Header "INTRODUCTION" git-debrebase is a tool for representing in git, and manpulating, Debian packages based on upstream source code. .PP This is the command line reference. Please read the tutorial \&\fBdgit\-maint\-debrebase\fR\|(7). For background, theory of operation, and definitions see \fBgit\-debrebase\fR\|(5). .PP You should read this manpage in conjunction with \&\*(L"\s-1TERMINOLOGY\*(R"\s0 in \fBgit\-debrebase\fR\|(5), which defines many important terms used here. .SH "PRINCIPAL OPERATIONS" .IX Header "PRINCIPAL OPERATIONS" .IP "git-debrebase [\-\- ]" 4 .IX Item "git-debrebase [-- ]" .PD 0 .IP "git-debrebase [\-i ]" 4 .IX Item "git-debrebase [-i ]" .PD Unstitches and launders the branch. (See \*(L"\s-1UNSTITCHING AND LAUNDERING\*(R"\s0 below.) .Sp Then, if any git-rebase options were supplied, edits the Debian delta queue, using git-rebase, by running .Sp .Vb 1 \& git rebase .Ve .Sp Do not pass a base branch argument: git-debrebase will supply that. Do not use \-\-onto, or \-\-fork\-point. Useful git-rebase options include \-i and \-\-autosquash. .Sp If git-rebase stops for any reason, you may git-rebase \-\-abort, \-\-continue, or \-\-skip, as usual. If you abort the git-rebase, the branch will still have been laundered, but everything in the rebase will be undone. .Sp The options for git-rebase must either start with \f(CW\*(C`\-i\*(C'\fR, or be prececded by \f(CW\*(C`\-\-\*(C'\fR, to distinguish them from options for git-debrebase. .Sp It is hazardous to use plain git-rebase on a git-debrebase branch, because git-rebase has a tendency to start the rebase too far back in history, and then drop important commits. See \*(L"\s-1ILLEGAL OPERATIONS\*(R"\s0 in \fBgit\-debrebase\fR\|(5) .IP "git-debrebase status" 4 .IX Item "git-debrebase status" Analyses the current branch, both in terms of its contents, and the refs which are relevant to git-debrebase, and prints a human-readable summary. .Sp Please do not attempt to parse the output; it may be reformatted or reorganised in the future. Instead, use one of the \*(L"\s-1UNDERLYING AND SUPPLEMENTARY OPERATIONS\*(R"\s0 described below. .IP "git-debrebase conclude" 4 .IX Item "git-debrebase conclude" Finishes a git-debrebase session, tidying up the branch and making it fast forward again. .Sp Specifically: if the branch is unstitched, launders and restitches it, making a new pseudomerge. Otherwise, it is an error, unless \-\-noop\-ok. .IP "git-debrebase quick" 4 .IX Item "git-debrebase quick" Unconditionally launders and restitches the branch, consuming any ffq-prev and making a new pseudomerge. .Sp If the branch is already laundered and stitched, does nothing. .IP "git-debrebase prepush [\-\-prose=]" 4 .IX Item "git-debrebase prepush [--prose=]" If the branch is unstitched, stitches it, consuming ffq-prev. .Sp This is a good command to run before pushing to a git server. You should consider using \fBconclude\fR instead, because that launders the branch too. .IP "git-debrebase stitch [\-\-prose=]" 4 .IX Item "git-debrebase stitch [--prose=]" Stitches the branch, consuming ffq-prev. .Sp If there is no ffq-prev, it is an error, unless \-\-noop\-ok. .Sp You should consider using \fBprepush\fR or \fBconclude\fR instead. .IP "git-debrebase scrap" 4 .IX Item "git-debrebase scrap" Throws away all the work since the branch was last stitched. This is done by rewinding you to ffq-prev. .Sp If you are in the middle of a git-rebase, will abort that too. .IP "git-debrebase new-upstream [...]" 4 .IX Item "git-debrebase new-upstream [...]" Rebases the delta queue onto a new upstream version. In detail: .Sp Firstly, checks that the proposed rebase seems to make sense: It is a snag unless the new upstream(s) are fast forward from the previous upstream(s) as found in the current breakwater anchor. And, in the case of a multi-piece upstream (a multi-component upstream, in dpkg-source terminology), if the pieces are not in the same order, with the same names. .Sp If all seems well, unstitches and launders the branch. .Sp Then, generates (in a private working area) a new anchor merge commit, on top of the breakwater tip, and on top of that a commit to update the version number in debian/changelog. .Sp Finally, starts a git-rebase of the delta queue onto these new commits. .Sp That git-rebase may complete successfully, or it may require your assistance, just like a normal git-rebase. .Sp If you git-rebase \-\-abort, the whole new upstream operation is aborted, except for the laundering. .Sp may be a whole new Debian version, including revision, or just the upstream part, in which case \-1 will be appended to make the new Debian version. .Sp The are, optionally, in order: .RS 4 .IP "" 4 .IX Item "" The new upstream branch (or commit-ish). The default is to look for one of these tags, in this order: U vU upstream/U; where U is the new upstream version. (This is the same algorithm as \fBgit\-deborig\fR\|(1).) .Sp It is a snag if the upstream contains a debian/ directory; if forced to proceed, git-debrebase will disregard the upstream's debian/ and take (only) the packaging from the current breakwater. .IP " " 4 .IX Item " " Specifies that this is a multi-piece upstream. May be repeated. .Sp When such a pair is specified, git-debrebase will first combine the pieces of the upstream together, and then use the result as the combined new upstream. .Sp For each , the tree of the becomes the subdirectory in the combined new upstream (supplanting any subdirectory that might be there in the main upstream branch). .Sp has a restricted syntax: it may contain only \s-1ASCII\s0 alphanumerics and hyphens. .Sp The combined upstream is itself recorded as a commit, with each of the upstream pieces' commits as parents. The combined commit contains an annotation to allow a future git-debrebase new upstream operation to make the coherency checks described above. .IP "" 4 .IX Item "" These will be passed to git rebase. .Sp If the upstream rebase is troublesome, \-i may be helpful. As with plain git-debrebase, do not specify a base, or \-\-onto, or \-\-fork\-point. .RE .RS 4 .Sp If you are planning to generate a .dsc, you will also need to have, or generate, actual orig tarball(s), which must be identical to the rev\-spec(s) passed to git-debrebase. git-debrebase does not concern itself with source packages so neither helps with this, nor checks it. \&\fBgit\-deborig\fR\|(1), \&\fBgit\-archive\fR\|(1), \fBdgit\fR\|(1) and \&\fBgbp\-import\-orig\fR\|(1) may be able to help. .RE .IP "git-debrebase make-patches [\-\-quiet\-would\-amend]" 4 .IX Item "git-debrebase make-patches [--quiet-would-amend]" Generate patches in debian/patches/ representing the changes made to upstream files. .Sp It is not normally necessary to run this command explicitly. When uploading to Debian, dgit and git-debrebase will cooperate to regenerate patches as necessary. When working with pure git remotes, the patches are not needed. .Sp Normally git-debrebase make-patches will require a laundered branch. (A laundered branch does not contain any patches.) But if there are already some patches made by git-debrebase make-patches, and all that has happened is that more changes to upstream files have been committed, running it again can add the missing patches. .Sp If the patches implied by the current branch are not a simple superset of those already in debian/patches, make-patches will fail with exit status 7, and an error message. (The message can be suppressed with \-\-quiet\-would\-amend.) If the problem is simply that the existing patches were not made by git-debrebase, using dgit quilt-fixup instead should succeed. .IP "git-debrebase convert-from-unapplied []" 4 .IX Item "git-debrebase convert-from-unapplied []" .PD 0 .IP "git-debrebase convert-from-gbp []" 4 .IX Item "git-debrebase convert-from-gbp []" .PD Converts any of the following into a git-debrebase interchange branch: .RS 4 .IP "\(bu" 4 a gbp patches-unapplied branch (but not a gbp pq patch-queue branch) .IP "\(bu" 4 a patches-unapplied git packaging branch containing debian/patches, as used with quilt .IP "\(bu" 4 a git branch for a package which has no Debian delta \- ie where upstream files are have not been modified in Debian, so there are no patches .RE .RS 4 .Sp (These two commands operate identically and are simply aliases.) .Sp The conversion is done by generating a new anchor merge, converting any quilt patches as a delta queue, and dropping the patches from the tree. .Sp The upstream commit-ish should correspond to the upstream branch or tag, if there is one. It is a snag if it is not an ancestor of \s-1HEAD,\s0 or if the history between the upstream and \s-1HEAD\s0 contains commits which make changes to upstream files. If it is not specified, the same algorithm is used as for git-debrebase new-upstream. .Sp It is also a snag if the specified upstream has a debian/ subdirectory. This check exists to detect certain likely user errors, but if this situation is true and expected, forcing it is fine. .Sp git-debrebase will try to look for the dgit archive view of the most recent release, and if it finds it will make a pseduomerge so that your new git-debrebase view is appropriately fast forward. .Sp The result is a well-formed git-debrebase interchange branch. The result is also fast-forward from the original branch. .Sp It is a snag if the new branch looks like it will have diverged, just as for a laundering/unstitching call to git-debrebase; See \*(L"Establish the current branch's ffq-prev\*(R", below. .Sp Note that it is dangerous not to know whether you are dealing with a (gbp) patches-unapplied branch containing quilt patches, or a git-debrebase interchange branch. At worst, using the wrong tool for the branch format might result in a dropped patch queue! .RE .SH "UNDERLYING AND SUPPLEMENTARY OPERATIONS" .IX Header "UNDERLYING AND SUPPLEMENTARY OPERATIONS" .IP "git-debrebase breakwater" 4 .IX Item "git-debrebase breakwater" Prints the breakwater tip commitid. If your \s-1HEAD\s0 branch is not fully laundered, prints the tip of the so-far-laundered breakwater. .IP "git-debrebase anchor" 4 .IX Item "git-debrebase anchor" Prints the breakwater anchor commitid. .IP "git-debrebase analyse" 4 .IX Item "git-debrebase analyse" Walks the history of the current branch, most recent commit first, back until the most recent anchor, printing the commit object id, and commit type and info (ie the semantics in the git-debrebase model) for each commit. .IP "git-debrebase record-ffq-prev" 4 .IX Item "git-debrebase record-ffq-prev" Establishes the current branch's ffq-prev, as discussed in \*(L"\s-1UNSTITCHING AND LAUNDERING\*(R"\s0, but does not launder the branch or move \s-1HEAD.\s0 .Sp It is an error if the ffq-prev could not be recorded. It is also an error if an ffq-prev has already been recorded, unless \-\-noop\-ok. .IP "git-debrebase launder\-v0" 4 .IX Item "git-debrebase launder-v0" Launders the branch without recording anything in ffq-prev. Then prints some information about the current branch. Do not use this operation; it will be withdrawn soon. .IP "git-debrebase convert-to-gbp" 4 .IX Item "git-debrebase convert-to-gbp" Converts a laundered branch into a gbp patches-unapplied branch containing quilt patches. The result is not fast forward from the interchange branch, and any ffq-prev is deleted. .Sp This is provided mostly for the test suite and for unusual situations. It should only be used with care and with a proper understanding of the underlying theory. .Sp Be sure to not accidentally treat the result as a git-debrebase branch, or you will drop all the patches! .IP "git-debrebase convert-from-dgit-view [] [upstream]" 4 .IX Item "git-debrebase convert-from-dgit-view [] [upstream]" Converts any dgit-compatible git branch corresponding to a (possibly hypothetical) 3.0 quilt dsc source package into a git-debrebase-compatible branch. .Sp This operation should not be used if the branch is already in git-debrebase form. Normally git-debrebase will refuse to continue in this case (or silently do nothing if the global \-\-noop\-ok option is used). .Sp Some representation of the original upstream source code will be needed. If \fIupstream\fR is supplied, that must be a suitable upstream commit. By default, git-debrebase will look first for git tags (as for new-upstream), and then for orig tarballs which it will ask dgit to process. .Sp The upstream source must be exactly right and all the patches in debian/patches must be up to date. Applying the patches from debian/patches to the upstream source must result in exactly your \s-1HEAD.\s0 .Sp The output is laundered and stitched. The resulting history is not particularly pretty, especially if orig tarball(s) were imported to produce a synthetic upstream commit. .Sp The available convert-options are as follows. (These must come after convert-from-dgit-view.) .RS 4 .IP "\-\-[no\-]diagnose" 4 .IX Item "--[no-]diagnose" Print additional error messages to help diagnose failure to find an appropriate upstream. \&\-\-no\-diagnose is the default. .IP "\-\-build\-products\-dir" 4 .IX Item "--build-products-dir" Directory to look in for orig tarballs. The default is the git config option dgit.default.build\-products\-dir or failing that, \f(CW\*(C`..\*(C'\fR. Passed on to dgit, if git-debrebase invokes dgit. .IP "\-\-[no\-]origs" 4 .IX Item "--[no-]origs" Whether to try to look for or use any orig tarballs. \&\-\-origs is the default. .IP "\-\-[no\-]tags" 4 .IX Item "--[no-]tags" Whether to try to look for or use any upstream git tags. \&\-\-tags is the default. .IP "\-\-always\-convert\-anyway" 4 .IX Item "--always-convert-anyway" Perform the conversion operation, producing unpleasant extra history, even if the branch seems to be in git-debrebase form already. This should not be done unless necessary, and it should not be necessary. .RE .RS 4 .RE .IP "git-debrebase forget-was-ever-debrebase" 4 .IX Item "git-debrebase forget-was-ever-debrebase" Deletes the ffq-prev and debrebase-last refs associated with this branch, that git-debrebase and dgit use to determine whether this branch is managed by git-debrebase, and what previous head may need to be stitched back in. .Sp This can be useful if you were just playing with git-debrebase, and have used git-reset \-\-hard to go back to a commit before your experiments. .Sp Do not use this if you expect to run git-debrebase on the branch again. .SH "OPTIONS" .IX Header "OPTIONS" This section documents the general options to git-debrebase (ie, the ones which immediately follow git-debrebase or git debrebase on the command line). Individual operations may have their own options which are docuented under each operation. .IP "\-f" 4 .IX Item "-f" Turns snag(s) with id into warnings. .Sp Some troublesome things which git-debrebase encounters are \fBsnag\fRs. (The specific instances are discussed in the text for the relevant operation.) .Sp When a snag is detected, a message is printed to stderr containing the snag id (in the form \f(CW\*(C`\-f\*(C'\fR), along with some prose. .Sp If snags are detected, git-debrebase does not continue, unless the relevant \-f is specified, or \-\-force is specified. .IP "\-\-force" 4 .IX Item "--force" Turns all snags into warnings. See the \-f option. .Sp Do not invoke git-debrebase \-\-force in scripts and aliases; instead, specify the particular \-f for expected snags. .IP "\-\-noop\-ok" 4 .IX Item "--noop-ok" Suppresses the error in some situations where git-debrebase does nothing, because there is nothing to do. .Sp The specific instances are discussed in the text for the relvant operation. .IP "\-\-anchor=" 4 .IX Item "--anchor=" Treats as an anchor. This overrides the usual logic which automatically classifies commits as anchors, pseudomerges, delta queue commits, etc. .Sp It also disables some coherency checks which depend on metadata extracted from its commit message, so it is a snag if is the anchor for the previous upstream version in git-debrebase new-upstream operations. .IP "\-\-dgit=" 4 .IX Item "--dgit=" Run , instead of dgit from \s-1PATH,\s0 when invocation of dgit is necessary. This is provided mostly for the benefit of the test suite. .IP "\-D" 4 .IX Item "-D" Requests (more) debugging. May be repeated. .IP "\-\-experimntal\-merge\-resolution" 4 .IX Item "--experimntal-merge-resolution" Enable experimental code for handling general merges (see \*(L"General merges\*(R" in \fBgit\-debrebase\fR\|(5)). .Sp This option may generate lossage of various kinds, including misleading error messages, references to nonexistent documentation, and you being handed an incomprehensible pile of multidimensional merge wreckage. .SH "UNSTITCHING AND LAUNDERING" .IX Header "UNSTITCHING AND LAUNDERING" Several operations unstitch and launder the branch first. In detail this means: .SS "Establish the current branch's ffq-prev" .IX Subsection "Establish the current branch's ffq-prev" If ffq-prev is not yet recorded, git-debrebase checks that the current branch is ahead of relevant remote tracking branches. The relevant branches depend on the current branch (and its git configuration) and are as follows: .IP "\(bu" 4 The branch that git would merge from (remote..merge, remote..remote); .IP "\(bu" 4 The branch git would push to, if different (remote..pushRemote etc.); .IP "\(bu" 4 For local dgit suite branches, the corresponding tracking remote; .IP "\(bu" 4 If you are on \f(CW\*(C`master\*(C'\fR, remotes/dgit/dgit/sid. .PP The apparently relevant ref names to check are filtered through branch..ffq\-ffrefs, which is a semicolon-separated list of glob patterns, each optionally preceded by !; first match wins. .PP In each case it is a snag if the local \s-1HEAD\s0 is behind the checked remote, or if local \s-1HEAD\s0 has diverged from it. All the checks are done locally using the remote tracking refs: git-debrebase does not fetch anything from anywhere. .PP If these checks pass, or are forced, git-debrebse then records the current tip as ffq-prev. .SS "Examine the branch" .IX Subsection "Examine the branch" git-debrebase analyses the current \s-1HEAD\s0's history to find the anchor in its breakwater, and the most recent breakwater tip. .SS "Rewrite the commits into laundered form" .IX Subsection "Rewrite the commits into laundered form" Mixed debian+upstream commits are split into two commits each. Delta queue (upstream files) commits bubble to the top. Pseudomerges, and quilt patch additions, are dropped. .PP This rewrite will always succeed, by construction. The result is the laundered branch. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBgit\-debrebase\fR\|(1), \&\fBdgit\-maint\-rebase\fR\|(7), \&\fBdgit\fR\|(1), \&\fBgitglossary\fR\|(7)