chiark / gitweb /
49fae981d8520be7f987c77b5ad15afd86beb2d2
[dgit.git] / README.git-debrebase
1
2
3 So it would be possible to write a `git-debrebase' tool which would
4 take (for example) B4, above, and be able to perform functions like:
5
6  * Strip pseudomerges: Rewrite the current branch so it contains no
7    pseudomerges, turning ...B3 into ...@-A-1-2-B3.  (This should
8    make a note, in your .git/ somewhere, of the original branch
9    tip so that it can be overwritten with a pseudomerge.)
10
11  * Cleanup branch: Reorganise the current branch so that the debian/
12    changes come first, turning -@-A-1-2-B3 into ...@-A-B-1-2-3.
13
14  * New upstream rebase: Start rebasing onto a new upstream version,
15    turning ...#..@-A-B-1-2-3 into (...#..@-A-B-|...#'-)@'-1-2.  This
16    would be a wrapper around git-rebase, which prepares @' and then
17    tries to rebase 1 2 onto @'.  So if you ask for an interactive
18    rebase @' doesn't appear in your commit list.
19
20    Note that the construction of @' cannot fail because @' simply
21    copies debian/ from B and and everything else from #'.  (Rebasing A
22    and B is undesirable.  We want the debian/ files to be non-rebasing
23    so we can `git log' and get the packaging history.)
24
25  * Record pseudomerge.  This is like "committing" your patch queue.
26    The LH parent is taken from the previously recorded tip.  (We could
27    perhaps check that this is consistent with what we see in
28    debian/changelog, but that is not a sufficient check so the
29    recorded tip check is primary.)
30
31 Maybe some of these operations should automatically edit
32 debian/changelog.