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 blah [implies start] strips pseudomerge(s)
36 commit / git-debrebase / etc.
39 hook: call git-debrebase prep-push adds new pm ? passes --overwrite ?
40 dgit push does not update remote
42 commit / git-debrebase / etc. strips pm(s) including last one
45 hook: call git-debrebase prep-push adds new pm ? passes --overwrite ?
46 dgit push DOES update remote
48 commit / git-debrebase / etc. strips last pm, but arranges
49 that remade pm will incorporate it
53 When we strip a pm, we need to maybe record it (or something) as the
56 We do this if the pm is contained within the output branch.
58 Actually this is not special to PMs.
60 We need to record a new to-be-overwritten commit
61 merge-base( our branch tip, relevant remote )
63 If this is not a descendant of the relevant remote, then we are going
64 to have a problem when we push so issue a warning or fail.
70 git-debrebase start or git-debrebase [continue]
72 with no recorded will-overwrite
74 putative will-overwrite is
77 obviously it is safe to say we will overwrite this
78 we do not need to worry about whether this will
79 overwrite not-included changes in the remote
80 because either the will-overwrite is not
81 ff from the remote (in which case later failure,
82 see below); or the will-overwrite _is_ ff
83 from the remote ie our tip is later than the
84 remote and includes all of its changes
86 this model tends to keep ad-hoc commits made on our
87 tip branch before we did rebase start, in the
88 `interchange view' and also in the rebase stack.
91 merge-base( current remote, current tip )
93 it is safe to overwrite current tip, by the
96 it is always safe to rewind will-overwrite: all
97 that does is overwrite _less_ stuff
99 this is the earliest overwrite we can make that
100 will be pushable to the remote
102 in practical terms this can only be ff from the
103 current remote if it is equal to the current remote;
104 so what we are actually checking below is that our tip
105 is ff from the remote. This ought to be true before
106 the first of our rebases.
108 this model tends to rewind and rebase ad-hoc commits
109 made on our tip branch before we did rebase start,
112 in any case putative will-overwrite must be ff from remote.
113 Otherwise when we push it will not be ff, even though we have
114 made pseudomerge to overwrite will-overwrite. So if we spot
115 this, report an error.
117 with a recorded will-overwrite
119 we may need to advance will-overwrite, to allow us to generate
120 future pseudomerges that will be pushable
122 advancing will-overwrite is dangerous, since it might
123 effectively cancel the commits that will-ovewrite is advanced
126 we advance it to merge-base( current remote, current tip )
127 if possible (see above), - ie to current remote, subject
128 to the condition that that is an ancestor of current tip
130 In each case we can strip pseudomerges freely, as needed. We do not
131 want to record what pseudomerges we strip, because whether we need to
132 keep them depends (only) on whether they have been pushed.
134 Is that actually true ? What if the user actually _wanted_ to keep
135 the pseudomerge despite not having pushed it ?
137 In that case we need to advance will-overwrite past it. We could
138 provide an explicit command to do this: it would advance
139 will-overwrite to the current tip (see rules above, which show that
140 this is OK). Or maybe to the last pseudomerge on the current tip,
141 so that the overall result will be series of pseudomerges.
143 ========================================
148 current HEAD (patches-unapplied),
149 this is going to be the base of the old breakwater
153 HEAD:<upstream> = upstream:<upstream>
154 upstream..HEAD:<upstream> is empty (overrideable)
155 upstremm:debian is empty (overrideable)
159 run gbp pq import to generate pq branch
162 commit to remove d/patches
163 breakwater pseudomerge with upstream
164 "rebase" of pq branch, each commit with d/patches stripped
166 what about dgit view branch ?
167 ideally, would make pseudomerge over dgit view
168 would need to check that dgit view is actually dgit view of
170 failing that first push will need --overwrite