From ea2e4102e8f2f461443978240a18cc3ea011b9bd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Jun 2016 12:23:16 +0100 Subject: [PATCH] Split brain: Detect patches-unapplied tree and print a suitable message Note that the message refers to `--quilt=gbp' aka `--quilt=apply' which do not exist yet (and which we're going to call something else, later in this series). Oh well. --- dgit | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/dgit b/dgit index 370986de..4d7c7219 100755 --- a/dgit +++ b/dgit @@ -2533,6 +2533,13 @@ sub quiltify_tree_sentinelfiles ($) { return $r; } +sub quilt_could_gbp ($$$) { + my ($userhead,$unapplied,$applied) = @_; + return + !quiltify_trees_differ($userhead,$unapplied,1) && + quiltify_trees_differ($userhead,$applied,1); +} + sub quiltify ($$$) { my ($clogp,$target,$unapplied) = @_; @@ -2678,6 +2685,12 @@ sub quiltify ($$$) { foreach my $notp (@nots) { print STDERR "$us: ", $reportnot->($notp), "\n"; } + if (quilt_could_gbp($target,$unapplied,$oldtiptree)) { + print STDERR <