chiark / gitweb /
git-debrebase: classify: provide Why for Unknown
[dgit.git] / git-debrebase
index acf4c8564749a9a812c4d17dca4749cdb80584b0..32737269a48120fa3f55720d8b778ca618ad3858 100755 (executable)
@@ -32,8 +32,7 @@
 #    git-debrebase [<options>] stitch [--prose=<for commit message>]
 #    git-debrebase [<options>] downstream-rebase-launder-v0  # experimental
 #
-#    git-debrebase [<options>] convert-from-gbp \
-#             <upstream>
+#    git-debrebase [<options>] convert-from-gbp <upstream-git-rev>
 
 # problems / outstanding questions:
 #
@@ -318,7 +317,6 @@ sub any_fproblems () {
 #   Upstream
 #   AddPatches
 #   Mixed
-#   Unknown
 #
 #   Pseudomerge
 #     has additional entres in classification result
@@ -332,6 +330,10 @@ sub any_fproblems () {
 #   BreakwaterUpstreamMerge
 #     has additional entry in classification result
 #       OrigParents = [ subset of Parents ]  # singleton list
+#
+#   Unknown
+#     has additional entry in classification result
+#       Why => "prose"
 
 sub parsecommit ($;$) {
     my ($objid, $p_ref) = @_;
@@ -390,7 +392,7 @@ sub classify ($) {
     };
     my $unknown = sub {
        my ($why) = @_;
-       $r = { %$r, Type => qw(Unknown) };
+       $r = { %$r, Type => qw(Unknown), Why => $why };
        printdebug " ** Unknown\n";
        return $r;
     };
@@ -1164,7 +1166,8 @@ END
 }
 
 sub cmd_convert_from_gbp () {
-    badusage "needs 1 optional argument, the upstream" unless @ARGV<=1;
+    badusage "needs 1 optional argument, the upstream git rev"
+       unless @ARGV<=1;
     my ($upstream_spec) = @ARGV;
     $upstream_spec //= 'refs/heads/upstream';
     my $upstream = git_rev_parse $upstream_spec;
@@ -1210,9 +1213,9 @@ sub cmd_convert_from_gbp () {
        runcmd @git, qw(checkout -q gdr-internal~0);
        rm_subdir_cached 'debian/patches';
        $work = make_commit ['HEAD'], [
- 'git-debrebase convert-from-gbp: drop patch queue',
+ 'git-debrebase convert-from-gbp: drop patches from tree',
  'Delete debian/patches, as part of converting to git-debrebase format.',
- '[git-debrebase convert-from-gbp: drop patches]'
+ '[git-debrebase convert-from-gbp: drop patches from tree]'
                              ];
        # make the breakwater pseudomerge
        # the tree is already exactly right