From: Ian Jackson Date: Mon, 5 Jun 2017 17:28:56 +0000 (+0100) Subject: git-debrebase: wip found X-Git-Tag: archive/debian/5.0~351 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=e3aeaf7586f5c030f15fa722fbee8c6952760ba1 git-debrebase: wip found --- diff --git a/git-debrebase b/git-debrebase index 376c67e8..e034abb9 100755 --- a/git-debrebase +++ b/git-debrebase @@ -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;