From: Ian Jackson Date: Sat, 4 Jun 2016 11:23:16 +0000 (+0100) Subject: Split brain: Detect patches-unapplied tree and print a suitable message X-Git-Tag: archive/debian/2.0~325 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ea2e4102e8f2f461443978240a18cc3ea011b9bd;ds=sidebyside 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. --- 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 <