chiark / gitweb /
changelog: start 8.5~
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 5fb018ed418a38b3e26398f67172210a85b6cd41..a0d2e0a0f86034b6accf6fe81fb4f8556c65d9b3 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -165,6 +165,7 @@ our %opts_cfg_insertpos = map {
 } keys %opts_opt_map;
 
 sub parseopts_late_defaults();
+sub quiltify_trees_differ ($$;$$$);
 sub setup_gitattrs(;$);
 sub check_gitattrs($$);
 
@@ -397,7 +398,9 @@ sub branch_is_gdr ($) {
            return 0;
        }
        if ($tip_patches eq '' and
-           !defined git_cat_file "$walk:debian") {
+           !defined git_cat_file "$walk~:debian" and
+           !quiltify_trees_differ "$walk~", $walk
+          ) {
            # (gdr classification of parent: BreakwaterStart
            printdebug "branch_is_gdr  $walk unmarked BreakwaterStart YES\n";
            return 1;
@@ -7018,6 +7021,7 @@ END
            fail f_ "lstat %s works but stat gives %s !", $here, $!;
        }
        fail f_ "stat %s: %s", $here, $! unless $! == ENOENT;
+       printdebug "not in bpd, $f ...\n";
        # $f does not exist in bpd, we need to transfer it
        my $there = $dscfn;
        $there =~ s{[^/]+$}{$f} or confess "$there ?";
@@ -7032,12 +7036,15 @@ END
                # abs2rel, despite its name, can take two relative paths
                $there = File::Spec->abs2rel($there,$buildproductsdir);
                # now $there is relative to bpd, great
+               printdebug "not in bpd, $f, abs2rel, $there ...\n";
            } else {
                $there = (dirname $maindir)."/$there_from_parent";
                # now $there is absoute
+               printdebug "not in bpd, $f, rel2rel, $there ...\n";
            }
        } elsif ($there =~ m#^/#) {
            # $there is absolute already
+           printdebug "not in bpd, $f, abs, $there ...\n";
        } else {
            fail f_
                "cannot import %s which seems to be inside working tree!",