3 git-debrebase(5) data model
4 git-debrebase(1) command line
6 dgit-maint-debrebase(7)
7 someone should set branch.<name>.mergeOptions to include --ff-only ?
9 clean up remains of README
11 arrange for dgit to automatically stitch on push
13 =======================================
17 [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
19 [git-debrebase: split mixed commit, debian part]
20 [git-debrebase: split mixed commit, upstream-part]
21 [git-debrebase: convert dgit import, debian changes]
22 [git-debrebase anchor: convert dgit import, upstream changes]
24 [git-debrebase upstream-combine . PIECE[ PIECE...]: new upstream]
25 [git-debrebase anchor: new upstream NEW-UPSTREAM-VERSION, merge]
26 [git-debrebase: new upstream NEW-UPSTREAM-VERSION, changelog]
28 [git-debrebase convert-from-gbp: drop patches]
29 [git-debrebase anchor: declare upstream]
30 [git-debrebase pseudomerge: stitch]
32 [git-debrebase convert-to-gbp: commit patches]
34 m{^\[git-debrebase (?:\w*-)?upstream combine \.((?: $extra_orig_namepart_re)+)\]}
36 Every anchor commit must be a merge. In principle, this is not
37 necessary. After all, we are relying on the
38 [git-debrebase anchor: ...]
39 commit message annotation in "declare" anchor merges (which
40 do not have any upstream changes), to distinguish those anchor
41 merges from ordinary pseudomerges (which we might just try to strip).
43 However, the user is going to be doing git-rebase a lot. We really
44 don't want them to rewrite an anchor commit. git-rebase
45 trips up on merges, so that is a useful safety catch.
47 =======================================
51 git-debrebase blah [implies start] strips pseudomerge(s)
53 commit / git-debrebase / etc.
56 hook: call git-debrebase prep-push dgit push does not update remote
57 or something, must add patches at least
59 commit / git-debrebase / etc. strips patches
62 hook: call git-debrebase prep-push dgit push DOES update remote
64 commit / git-debrebase / etc. strips last pm, but arranges
65 that remade pm will incorporate it
67 ========================================
71 refs/ffq-prev/REF relates to refs/REF
73 When we strip a pm, we need to maybe record it (or something) as the
78 with no recorded ffq-prev
80 ffq-prev is our current tip
82 obviously it is safe to say we will overwrite this
83 we do check whether there are not-included changes in the remotes
84 because if the new ffq-prev is not ff from the remotes
85 the later pushes will fail
87 this model tends to keep ad-hoc commits made on our
88 tip branch before we did rebase start, in the
89 `interchange view' and also in the rebase stack.
91 also we can explicitly preserve with
94 It is always safe to rewind ffq-prev: all
95 that does is overwrite _less_ stuff.
97 in any case putative ffq-prev must be ff from remote.
98 Otherwise when we push it will not be ff, even though we have
99 made pseudomerge to overwrite ffq-prev. So if we spot
100 this, report an error. see above
102 with a recorded ffq-prev
104 we may need to advance ffq-prev, to allow us to generate
105 future pseudomerges that will be pushable
107 advancing ffq-prev is dangerous, since it might
108 effectively cancel the commits that will-ovewrite is advanced
111 ??? advance it to merge-base( current remote, current tip )
112 if possible (see above), - ie to current remote, subject
113 to the condition that that is an ancestor of current tip
115 currently this is not implemented
117 better maybe to detect divergence ? but it is rather late
120 We check we are ff from remotes before recording new ffq-prev
122 ---------- now follows much the same info in different words ----------
124 1. git-debrebase [-i etc.]
128 if is already a ffq-prev, fine, do no more
131 check our origin branch exists and we are ff from it
134 check our other might-be-pushed to branches
135 check we are ff from them
138 set ffq-prev to something which is ff from
141 we use our tip, as discussed above
142 (optionally, can use some other commit which is ff
143 from all of the above, eg one of them)
145 N. git-debrebase [--noop-ok] record-ffq-prev
147 does what is described above
149 2. git-debrebase [--noop-ok] stitch
151 makes pseudomerge with ffq-prev
154 we will teach dgit to do
158 following parts are not implemented and maybe aren't the
159 best subcommand names etc.
161 3. git-debrebase push
163 like git push only does stitch first
164 ??? command line parsing!
166 4. git-debrebase release
168 stiches, finalises changelog, signs tags, pushes everything
169 for the future, when there is some automatic builder
171 ========================================
175 what about dgit view branch ?
176 ideally, would make pseudomerge over dgit view
177 would need to check that dgit view is actually dgit view of
179 failing that first push will need --overwrite
180 that is what is currently implemented
182 ========================================
184 how to handle divergence and merges (if not detected soon enough)
187 if merge, look at branches before merge
188 generate new combined branch
189 pseudomerge to overwrite merge
191 current avaiable strategies:
193 maybe launder foreign branch
195 if foreign branch is nmuish, can rebase it onto ours
197 could merge breakwaters (use analyse to find them)
198 merge breakwaters (assuming same upstream)
199 manually construct new patch queue by inspection of
200 the other two patch queues
202 instead of manually constructing patch queue, could use
203 gbp pq export and git merge the patch queues
204 (ie work with interdiffs)
206 if upstreams are different and one is ahead
207 simply treat that as "ours" and
208 do the work to import changes from the other
210 if upstreams have diverged, can
211 resolve somehow to make new upstream
212 do new-upstream on each branch separately
213 now reduced to previously "solved" problem
215 in future, auto patch queue merge algorithm
216 determine next patch to apply
217 there are three versions o..O, l..L, r..R
218 we have already constructed m (previous patch or merged breakwater)
219 try using vector calculus in the implied cube and compute
220 multiple ways to check consistency ?
222 ========================================
224 For downstreams of Debian, sketch of git-ffqrebase
226 # git-ffqrebase start [BASE]
227 # # records previous HEAD so it can be overwritten
228 # # records base for future git-ffqrebase
229 # git-ffqrebase set-base BASE
230 # git-ffqrebase <git-rebase options>
231 # git-ffqrebase finish
232 # git-ffqrebase status [BRANCH]