3 # git-ffqrebase start [BASE]
4 # # records previous HEAD so it can be overwritten
5 # # records base for future git-ffqrebase
6 # git-ffqrebase set-base BASE
7 # git-ffqrebase <git-rebase options>
9 # git-ffqrebase status [BRANCH]
11 # refs/ffqrebase-prev/BRANCH BRANCH may be refs/...; if not it means
12 # refs/ffqrebase-base/BRANCH refs/heads/BRANCH
13 # zero, one, or both of these may exist
15 # git-debrebase without start, if already started, is willing
16 # to strip pseudomerges provided that they overwrite exactly
18 # xxxx is this right ? what matters is have we pushed
19 # I think in fact the right answer is:
20 # git-debrebase always strips out pseudomerges from its branch
21 # a pseudomerge is put in at the time we want to push
22 # at that time, we make a pseudomerge of the remote tracking
23 # branch (if raw git) or the dgit view (if dgit)
24 # for raw git git-ffqrebase, do want preciseley to record
25 # value of remote tracking branch or our branch, on start, so we
26 # overwrite only things we intend to
27 # the previous pseudomerge check for tags and remote branches ?
34 [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
36 [git-debrebase: split mixed commit, debian part]
37 [git-debrebase: split mixed commit, upstream-part]
38 [git-debrebase: convert dgit import, debian changes]
39 [git-debrebase breakwater: convert dgit import, upstream changes]
41 [git-debrebase upstream-combine . PIECE[ PIECE...]: new upstream]
42 [git-debrebase breakwater: new upstream NEW-UPSTREAM-VERSION, merge]
43 [git-debrebase: new upstream NEW-UPSTREAM-VERSION, changelog]
45 [git-debrebase: gbp2debrebase, drop patches]
46 [git-debrebase breakwater: declare upstream]
48 m{^\[git-debrebase (?:\w*-)?upstream combine \.((?: $extra_orig_namepart_re)+)\]}
54 git-debrebase blah [implies start] strips pseudomerge(s)
56 commit / git-debrebase / etc.
59 hook: call git-debrebase prep-push adds new pm ? passes --overwrite ?
60 dgit push does not update remote
62 commit / git-debrebase / etc. strips pm(s) including last one
65 hook: call git-debrebase prep-push adds new pm ? passes --overwrite ?
66 dgit push DOES update remote
68 commit / git-debrebase / etc. strips last pm, but arranges
69 that remade pm will incorporate it
73 When we strip a pm, we need to maybe record it (or something) as the
76 We do this if the pm is contained within the output branch.
78 Actually this is not special to PMs.
80 We need to record a new to-be-overwritten commit
81 merge-base( our branch tip, relevant remote )
83 If this is not a descendant of the relevant remote, then we are going
84 to have a problem when we push so issue a warning or fail.
90 git-debrebase start or git-debrebase [continue]
92 with no recorded will-overwrite
94 putative will-overwrite is
97 obviously it is safe to say we will overwrite this
98 we do not need to worry about whether this will
99 overwrite not-included changes in the remote
100 because either the will-overwrite is not
101 ff from the remote (in which case later failure,
102 see below); or the will-overwrite _is_ ff
103 from the remote ie our tip is later than the
104 remote and includes all of its changes
106 this model tends to keep ad-hoc commits made on our
107 tip branch before we did rebase start, in the
108 `interchange view' and also in the rebase stack.
111 merge-base( current remote, current tip )
113 it is safe to overwrite current tip, by the
116 it is always safe to rewind will-overwrite: all
117 that does is overwrite _less_ stuff
119 this is the earliest overwrite we can make that
120 will be pushable to the remote
122 in practical terms this can only be ff from the
123 current remote if it is equal to the current remote;
124 so what we are actually checking below is that our tip
125 is ff from the remote. This ought to be true before
126 the first of our rebases.
128 this model tends to rewind and rebase ad-hoc commits
129 made on our tip branch before we did rebase start,
132 in any case putative will-overwrite must be ff from remote.
133 Otherwise when we push it will not be ff, even though we have
134 made pseudomerge to overwrite will-overwrite. So if we spot
135 this, report an error.
137 with a recorded will-overwrite
139 we may need to advance will-overwrite, to allow us to generate
140 future pseudomerges that will be pushable
142 advancing will-overwrite is dangerous, since it might
143 effectively cancel the commits that will-ovewrite is advanced
146 we advance it to merge-base( current remote, current tip )
147 if possible (see above), - ie to current remote, subject
148 to the condition that that is an ancestor of current tip
150 In each case we can strip pseudomerges freely, as needed. We do not
151 want to record what pseudomerges we strip, because whether we need to
152 keep them depends (only) on whether they have been pushed.
154 Is that actually true ? What if the user actually _wanted_ to keep
155 the pseudomerge despite not having pushed it ?
157 In that case we need to advance will-overwrite past it. We could
158 provide an explicit command to do this: it would advance
159 will-overwrite to the current tip (see rules above, which show that
160 this is OK). Or maybe to the last pseudomerge on the current tip,
161 so that the overall result will be series of pseudomerges.
163 ========================================
168 current HEAD (patches-unapplied),
169 this is going to be the base of the old breakwater
173 HEAD:<upstream> = upstream:<upstream>
174 upstream..HEAD:<upstream> is empty (overrideable)
175 upstremm:debian is empty (overrideable)
179 run gbp pq import to generate pq branch
182 commit to remove d/patches
183 breakwater pseudomerge with upstream
184 "rebase" of pq branch, each commit with d/patches stripped
186 what about dgit view branch ?
187 ideally, would make pseudomerge over dgit view
188 would need to check that dgit view is actually dgit view of
190 failing that first push will need --overwrite