chiark / gitweb /
git-debrebase: wip found
[dgit.git] / git-debrebase
index 8c1dba80b881d257ca161305aa63c33e990272da..87d605b6e50e7d0a75ef9a0dc5fa74afd077aba0 100755 (executable)
@@ -63,7 +63,7 @@
 #             - no fast forward checks
 #  for now only explicit with commitids
 
-    # implicitly uses `upstream'
+#         implicitly uses `upstream'
 #                                     # (or multiple other branches)
 #       git-debrebase new-upstream \
 #             [<subdir>/]=<commitid>
 #  refs/ffqrebase-prev/BRANCH    BRANCH may be refs/...; if not it means
 #  refs/ffqrebase-base/BRANCH      refs/heads/BRANCH
 #                               zero, one, or both of these may exist
+s
+# git-debrebase without start, if already started, is willing
+# to strip pseudomerges provided that they overwrite exactly
+# the previous HEAD
+#  xxxx is this right ?  what matters is have we pushed
+#  the previous pseudomerge    check for tags and remote branches ?
 
 use strict;
 
@@ -288,7 +294,7 @@ sub classify ($) {
 
 sub walk ($$$;$$$) {
     my ($input, $pseudos_must_overwrite_this, $wantdebonly,
-       $report, $depth, $report_anomaly, $nogenerate) = @_;
+       $report, $depth, $report_anomaly, $report_only) = @_;
     # go through commits backwards
     # we generate two lists of commits to apply
     # => ($tip, $breakwater_tip)
@@ -323,22 +329,18 @@ sub walk ($$$;$$$) {
        my $st = $cl->{SubType};
        $report->($cl);
        $found{$ty. ( defined($st) ? "-$st" : '' )}++;
+       push @processed, $cl;
        my $p0 = $cl->{Parents}[0]{CommitId};
-       $cl->{Abbrev} = lc substr $ty,0,1;
        if ($ty eq 'AddPatches') {
-           $cl->{Abbrev} = 'P';
            $cur = $p0;
            $rewrite_from_here->();
            next;
        } elsif ($ty eq 'Packaging') {
-           $cl->{Abbrev} = 'd';
            push @deb_cl, $cl;
-           push @processed, $cl;
            $cur = $p0;
            next;
        } elsif ($ty eq 'Upstream') {
            push @ups_cl, $cl;
-           push @processed, $cl;
            $cur = $p0;
            next;
        } elsif ($ty eq 'Mixed') {
@@ -352,7 +354,6 @@ sub walk ($$$;$$$) {
            $rewrite_from_here->();
            next;
        } elsif ($ty eq 'Pseudomerge') {
-           $cl->{Abbrev} = 'M';
            if (defined $pseudos_must_overwrite_this &&
                !grep {
                    is_fast_fwd $pseudos_must_overwrite_this, $_->{CommitId}
@@ -372,7 +373,6 @@ sub walk ($$$;$$$) {
            last;
        } elsif ($ty eq 'DgitImportUnpatched' &&
                 @pseudomerges == 1) {
-           $cl->{Abbrev} = 'I';
            # This import has a tree which is just like a breakwater
            # tree, but it has the wrong history.  Its ought to have
            # the previous breakwater (which dgit ought to have
@@ -412,7 +412,7 @@ sub walk ($$$;$$$) {
 
     workarea_fresh();
 
-    my $rewriting = 1;
+    my $rewriting = 0;
 
     my $build = $basis;