chiark / gitweb /
git-debrebase: Make all commit annotations have a COMMIT-TYPE
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 23:43:17 +0000 (00:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 23:43:17 +0000 (00:43 +0100)
Omitting this sometimes turns out to have a mistake.  We are going to
want to distinguish at least split from other commits.  Add a
COMMIT-TYPE to the others as future-proofing.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase
git-debrebase.5.pod

index c353111249ee99edb70d069528e94da938fe8af5..529286e697c4d346313a54bf3228e3ce9b460814 100755 (executable)
@@ -1201,8 +1201,8 @@ sub walk ($;$$$) {
        my ($prose, $info) = @_;
        my $ms = $cl->{Msg};
        chomp $ms;
-       $info //= '';
-       $ms .= "\n\n[git-debrebase$info: $prose]\n";
+       confess unless defined $info;
+       $ms .= "\n\n[git-debrebase $info: $prose]\n";
        return (Msg => $ms);
     };
     my $rewrite_from_here = sub {
@@ -1283,7 +1283,7 @@ sub walk ($;$$$) {
        } elsif ($ty eq 'Mixed') {
            my $queue = sub {
                my ($q, $wh) = @_;
-               my $cls = { %$cl, $xmsg->("split mixed commit: $wh part") };
+               my $cls = { %$cl, $xmsg->("mixed commit: $wh part",'split') };
                push @$q, $cls;
            };
            $queue->(\@brw_cl, "debian");
@@ -1336,12 +1336,12 @@ sub walk ($;$$$) {
                push @brw_cl, {
                    %$cl,
                    SpecialMethod => 'DgitImportDebianUpdate',
-                    $xmsg->("convert dgit import: debian changes")
+                    $xmsg->("debian changes", 'convert dgit import')
                }, {
                    %$cl,
                    SpecialMethod => 'DgitImportUpstreamUpdate',
                     $xmsg->("convert dgit import: upstream update",
-                           " anchor")
+                           "anchor")
                };
                $prline->(" Import");
                $rewrite_from_here->(\@brw_cl);
@@ -1534,7 +1534,7 @@ sub walk ($;$$$) {
                 %$cl,
                 SpecialMethod => 'MergeCreateMergedBreakwaters',
                 $xmsg->('constructed from vanilla merge',
-                       ' merged-breakwater'),
+                       'merged-breakwater'),
             };
            push @upp_cl, {
                 %$cl,
@@ -2198,7 +2198,7 @@ END
        # Now we have the final new breakwater branch in the index
         $new_bw = make_commit [ $new_bw ],
             [ "Update changelog for new upstream $new_upstream_version",
-              "[git-debrebase: new upstream $new_upstream_version, changelog]",
+              "[git-debrebase changelog: new upstream $new_upstream_version]",
             ];
     };
 
@@ -2411,7 +2411,7 @@ sub make_patches ($) {
        read_tree_subdir 'debian/patches', $ptree;
        $out = make_commit [$head], [
             'Commit patch queue (exported by git-debrebase)',
-            '[git-debrebase: export and commit patches]',
+            '[git-debrebase make-patches: export and commit patches]',
         ];
     };
     return $out;
@@ -2750,7 +2750,7 @@ Import effective orig tree for upstream version $version
 END
 This includes the contents of the .orig(s), minus any debian/ directory.
 
-[git-debrebase import-from-dgit-view upstream-import-convert: $version]
+[git-debrebase convert-from-dgit-view upstream-import-convert: $version]
 END
                                                    ];
                    push @upstreams, { Commit => $ups_synth,
@@ -2784,7 +2784,7 @@ END
  'git-debrebase convert-from-dgit-view: drop upstream changes from breakwater',
  "Drop upstream changes, and delete debian/patches, as part of converting\n".
  "to git-debrebase format.  Upstream changes will appear as commits.",
- '[git-debrebase convert-from-dgit-view: drop patches from tree]'
+ '[git-debrebase convert-from-dgit-view drop-patches]'
                                           ];
            }
            $work = make_commit [ $work, $u->{Commit} ], [
index f641a70fe756fd8147c82e86c40335d26041c29b..e3ed30930b43c81d90556de5b747e092a04122bd 100644 (file)
@@ -551,21 +551,21 @@ in the messages of commits it generates.
 
 The general form is
 
-  [git-debrebase[ COMMIT-TYPE [ ARGS...]]: PROSE, MORE PROSE]
+  [git-debrebase COMMIT-TYPE [ ARGS...]: PROSE, MORE PROSE]
 
 git-debrebase treats anything after the colon as a comment,
 paying no attention to PROSE.
 
 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 split: mixed commit, debian part]
+  [git-debrebase split: mixed commit, upstream-part]
+  [git-debrebase onvert 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: export and commit patches]
+  [git-debrebase changelog: new upstream NEW-UPSTREAM-VERSION]
+  [git-debrebase make-patches: export and commit patches]
 
   [git-debrebase convert-from-gbp: drop patches]
   [git-debrebase anchor: declare upstream]
@@ -574,6 +574,8 @@ The full set of annotations is:
   [git-debrebase merged-breakwater: constructed from vanilla merge]
 
   [git-debrebase convert-to-gbp: commit patches]
+  [git-debrebase convert-from-dgit-view upstream-import-convert: VERSION]
+  [git-debrebase convert-from-dgit-view drop-patches]
 
 Only anchor merges have the C<[git-debrebase anchor: ...]> tag.
 Single-parent anchors are not generated by git-debrebase,