chiark / gitweb /
git-debrebase: wip found
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Jun 2017 17:28:56 +0000 (18:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
git-debrebase

index 376c67e86f71b9476a13ac25ecb3739a65f84daf..e034abb91e760ba43d7ffe574b472ec26fa37e65 100755 (executable)
@@ -236,9 +236,14 @@ sub classify ($) {
        } elsif ($d & (D_PAT_ADD|D_PAT_OTH)) {
            return $unknown->("edits debian/patches");
        } elsif ($d == D_DEB) {
-           check if there were any deb before, if not this is
-               a packaging introduction (ie breakwater root)
-           return $classify->(qw(Packaging));
+           my ($ty,$dummy) = git_cat_file "$ph[0]:debian";
+           if ($ty eq 'tree') {
+               return $classify->(qw(Packaging));
+           } elsif ($ty eq 'missing') {
+               return $classify->(qw(BreakwaterStart));
+           } else {
+               return $unknown->("parent's debian is not a directory");
+           }
        } elsif ($d == D_UPS) {
            return $classify->(qw(Upstream));
        } elsif ($d == (D_DEB|D_UPS)) {
@@ -376,6 +381,10 @@ sub walk {
            push @deb_cl, $cl;
            $cur = $p0;
            next;
+       } elsif ($ty eq 'Packaging') {
+           push @deb_cl, $cl;
+           $cur = $p0;
+           next;
        } elsif ($ty eq 'Upstream') {
            push @ups_cl, $cl;
            $cur = $p0;