chiark / gitweb /
dgit: Do not misrecognise some initial packaging as gdr-processable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Mar 2019 18:01:18 +0000 (18:01 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Mar 2019 20:35:22 +0000 (20:35 +0000)
git-debrebase expects a breakwater start commit to not make any
changes to upstream files.  This means that sometimes dgit would fail
to make this check, and expect gdr to be able to make patches; but
then gdr would reject the branch.

It is still of course possible for dgit to ask gdr to make patches for
branches that the user does not *intend* to be handled by gdr, but
that is OK so long as gdr will DTRT.

Closes: #922446
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index f33aab8c0838fb93a0c7357a19ad1fd1563f6df1..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;