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 NOTES and README
11 arrange for dgit to automatically stitch on push
13 ========================================
15 # refs/ffq-prev/REF relates to refs/REF
17 =======================================
21 [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
23 [git-debrebase: split mixed commit, debian part]
24 [git-debrebase: split mixed commit, upstream-part]
25 [git-debrebase: convert dgit import, debian changes]
26 [git-debrebase anchor: convert dgit import, upstream changes]
28 [git-debrebase upstream-combine . PIECE[ PIECE...]: new upstream]
29 [git-debrebase anchor: new upstream NEW-UPSTREAM-VERSION, merge]
30 [git-debrebase: new upstream NEW-UPSTREAM-VERSION, changelog]
32 [git-debrebase convert-from-gbp: drop patches]
33 [git-debrebase anchor: declare upstream]
34 [git-debrebase pseudomerge: stitch]
36 [git-debrebase convert-to-gbp: commit patches]
38 m{^\[git-debrebase (?:\w*-)?upstream combine \.((?: $extra_orig_namepart_re)+)\]}
40 Every anchor commit must be a merge. In principle, this is not
41 necessary. After all, we are relying on the
42 [git-debrebase anchor: ...]
43 commit message annotation in "declare" anchor merges (which
44 do not have any upstream changes), to distinguish those anchor
45 merges from ordinary pseudomerges (which we might just try to strip).
47 However, the user is going to be doing git-rebase a lot. We really
48 don't want them to rewrite an anchor commit. git-rebase
49 trips up on merges, so that is a useful safety catch.
51 =======================================
55 git-debrebase blah [implies start] strips pseudomerge(s)
57 commit / git-debrebase / etc.
60 hook: call git-debrebase prep-push dgit push does not update remote
61 or something, must add patches at least
63 commit / git-debrebase / etc. strips patches
66 hook: call git-debrebase prep-push dgit push DOES update remote
68 commit / git-debrebase / etc. strips last pm, but arranges
69 that remade pm will incorporate it
71 ========================================
75 When we strip a pm, we need to maybe record it (or something) as the
80 with no recorded ffq-prev
82 ffq-prev is our current tip
84 obviously it is safe to say we will overwrite this
85 we do check whether there are not-included changes in the remotes
86 because if the new ffq-prev is not ff from the remotes
87 the later pushes will fail
89 this model tends to keep ad-hoc commits made on our
90 tip branch before we did rebase start, in the
91 `interchange view' and also in the rebase stack.
93 also we can explicitly preserve with
96 It is always safe to rewind ffq-prev: all
97 that does is overwrite _less_ stuff.
99 in any case putative ffq-prev must be ff from remote.
100 Otherwise when we push it will not be ff, even though we have
101 made pseudomerge to overwrite ffq-prev. So if we spot
102 this, report an error. see above
104 with a recorded ffq-prev
106 we may need to advance ffq-prev, to allow us to generate
107 future pseudomerges that will be pushable
109 advancing ffq-prev is dangerous, since it might
110 effectively cancel the commits that will-ovewrite is advanced
113 ??? advance it to merge-base( current remote, current tip )
114 if possible (see above), - ie to current remote, subject
115 to the condition that that is an ancestor of current tip
117 currently this is not implemented
119 better maybe to detect divergence ? but it is rather late
122 We check we are ff from remotes before recording new ffq-prev
124 ---------- now follows much the same info in different words ----------
126 1. git-debrebase [-i etc.]
130 if is already a ffq-prev, fine, do no more
133 check our origin branch exists and we are ff from it
136 check our other might-be-pushed to branches
137 check we are ff from them
140 set ffq-prev to something which is ff from
143 we use our tip, as discussed above
144 (optionally, can use some other commit which is ff
145 from all of the above, eg one of them)
147 N. git-debrebase [--noop-ok] record-ffq-prev
149 does what is described above
151 2. git-debrebase [--noop-ok] stitch
153 makes pseudomerge with ffq-prev
156 we will teach dgit to do
159 3. git-debrebase push
161 like git push only does stitch first
162 ??? command line parsing!
164 4. git-debrebase release
166 stiches, finalises changelog, signs tags, pushes everything
167 for the future, when there is some automatic builder
169 ffq-prev for each ref
174 ========================================
178 what about dgit view branch ?
179 ideally, would make pseudomerge over dgit view
180 would need to check that dgit view is actually dgit view of
182 failing that first push will need --overwrite
183 that is what is currently implemented
185 ========================================
187 how to handle divergence and merges (if not detected soon enough)
190 if merge, look at branches before merge
191 generate new combined branch
192 pseudomerge to overwrite merge
194 current avaiable strategies:
196 maybe launder foreign branch
198 if foreign branch is nmuish, can rebase it onto ours
200 could merge breakwaters (use analyse to find them)
201 merge breakwaters (assuming same upstream)
202 manually construct new patch queue by inspection of
203 the other two patch queues
205 instead of manually constructing patch queue, could use
206 gbp pq export and git merge the patch queues
207 (ie work with interdiffs)
209 if upstreams are different and one is ahead
210 simply treat that as "ours" and
211 do the work to import changes from the other
213 if upstreams have diverged, can
214 resolve somehow to make new upstream
215 do new-upstream on each branch separately
216 now reduced to previously "solved" problem
218 in future, auto patch queue merge algorithm
219 determine next patch to apply
220 there are three versions o..O, l..L, r..R
221 we have already constructed m (previous patch or merged breakwater)
222 try using vector calculus in the implied cube and compute
223 multiple ways to check consistency ?
225 ========================================
227 # git-ffqrebase start [BASE]
228 # # records previous HEAD so it can be overwritten
229 # # records base for future git-ffqrebase
230 # git-ffqrebase set-base BASE
231 # git-ffqrebase <git-rebase options>
232 # git-ffqrebase finish
233 # git-ffqrebase status [BRANCH]