chiark / gitweb /
git-debrebase(5): Document commit message annotations
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Feb 2018 22:46:58 +0000 (22:46 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:06:59 +0000 (16:06 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
NOTES.git-debrebase
git-debrebase
git-debrebase.5.pod

index 09237d5973cda501e24ecb4acb4b73c7e4a45a51..508d590c88d51d44b604cefff63fda6fc0f63bb6 100644 (file)
@@ -10,42 +10,6 @@ TODO
 
    arrange for dgit to automatically stitch on push
 
-=======================================
-
-special commit tags
-overall format
-  [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
-
-[git-debrebase: split mixed commit, debian part]
-[git-debrebase: split mixed commit, upstream-part]
-[git-debrebase: convert dgit import, debian changes]
-[git-debrebase anchor: convert dgit import, upstream changes]
-
-[git-debrebase upstream-combine . PIECE[ PIECE...]: new upstream]
-[git-debrebase anchor: new upstream NEW-UPSTREAM-VERSION, merge]
-[git-debrebase: new upstream NEW-UPSTREAM-VERSION, changelog]
-
-[git-debrebase convert-from-gbp: drop patches]
-[git-debrebase anchor: declare upstream]
-[git-debrebase pseudomerge: stitch]
-
-[git-debrebase convert-to-gbp: commit patches]
-
-m{^\[git-debrebase (?:\w*-)?upstream combine \.((?: $extra_orig_namepart_re)+)\]}
-
-Every anchor commit must be a merge.  In principle, this is not
-necessary.  After all, we are relying on the
-    [git-debrebase anchor: ...]
-commit message annotation in "declare" anchor merges (which
-do not have any upstream changes), to distinguish those anchor
-merges from ordinary pseudomerges (which we might just try to strip).
-
-However, the user is going to be doing git-rebase a lot.  We really
-don't want them to rewrite an anchor commit.  git-rebase
-trips up on merges, so that is a useful safety catch.
-
-=======================================
-
 workflow
 
   git-debrebase blah [implies start]       strips pseudomerge(s)
index cdd6348a122efc405a6de50d3338d6b1356da12d..5b2312d82899e7219de93b2525858dee8f823c98 100755 (executable)
@@ -438,6 +438,23 @@ sub classify ($) {
        # multi-orig upstreams are represented with an anchor merge
        # from a single upstream commit which combines the orig tarballs
 
+       # Every anchor tagged this way must be a merge.
+       # We are relying on the
+       #     [git-debrebase anchor: ...]
+       # commit message annotation in "declare" anchor merges (which
+       # do not have any upstream changes), to distinguish those
+       # anchor merges from ordinary pseudomerges (which we might
+       # just try to strip).
+       #
+       # However, the user is going to be doing git-rebase a lot.  We
+       # really don't want them to rewrite an anchor commit.
+       # git-rebase trips up on merges, so that is a useful safety
+       # catch.
+       #
+       # BreakwaterStart commits are also anchors in the terminology
+       # of git-debrebase(5), but they are untagged (and always
+       # manually generated).
+
        my $badanchor = sub { $unknown->("git-debrebase \`anchor' but @_"); };
        @p == 2 or return $badanchor->("has other than two parents");
        $haspatches and return $badanchor->("contains debian/patches");
index 6fc1ae54962b3495e239d352f304bb008146a416..6d61baad9fd0ebb471157314b957d01dc3de9b97 100644 (file)
@@ -352,6 +352,42 @@ in B<debian/patches/>.
 
 =back
 
+=head1 COMMIT MESSAGE ANNOTATIONS
+
+git-debrebase makes annotations
+in the messages of commits it generates.
+
+The general form is
+
+  [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
+
+git-debrebase does not pay attention to anything after the colon,
+so PROSE is ignored.
+
+The full set of annotations is:
+  [git-debrebase: split mixed commit, debian part]
+  [git-debrebase: split mixed commit, upstream-part]
+  [git-debrebase: convert dgit import, debian changes]
+  [git-debrebase anchor: convert dgit import, upstream changes]
+
+  [git-debrebase upstream-combine . PIECE[ PIECE...]: new upstream]
+  [git-debrebase anchor: new upstream NEW-UPSTREAM-VERSION, merge]
+  [git-debrebase: new upstream NEW-UPSTREAM-VERSION, changelog]
+
+  [git-debrebase convert-from-gbp: drop patches]
+  [git-debrebase anchor: declare upstream]
+  [git-debrebase pseudomerge: stitch]
+
+  [git-debrebase convert-to-gbp: commit patches]
+
+Only anchor merges have the C<[git-debrebase anchor: ...]> tag.
+Single-parent anchors are not generated by git-debrebase,
+and when made manually should not be tagged.
+
+The C<split mixed commit> and C<convert dgit import>
+tags are added to the pre-existing commit message,
+when git-debrebase rewrites the commit.
+
 =head1 TERMINOLOGY
 
 =over