From ef9fb96766ba8b8eaba540a760efa4db4b1bb5da Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 6 Jan 2018 01:50:00 +0000 Subject: [PATCH] dgit: Fix suggested diff rune in split brain mode In split brain mode, with unexpected diffs, print dgit view commitid in suggested diff rune. HEAD is wrong in this case. Closes:#886443. Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ dgit | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 087dc216..aa98a41a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ dgit (4.2~) experimental; urgency=medium Sean Whitton] Closes:#856402. Minor fixes: + * In split brain mode, with unexpected diffs, print dgit view + commitid in suggested diff rune. (HEAD is wrong.) Closes:#886443. * Fix message about missing quilt cache entry to refer to HEAD rather than tree, since dgit needs a commit. Closes:#884646. * Fix grammar error in 4.1 changelog entry. [Sean Whitton] diff --git a/dgit b/dgit index 3a9b46c1..aa8f7717 100755 --- a/dgit +++ b/dgit @@ -4238,13 +4238,14 @@ END my $r = system @diffcmd; if ($r) { if ($r==256) { + my $referent = $split_brain ? $dgithead : 'HEAD'; my $diffs = cmdoutput @git, qw(diff --stat), $tree, $dgithead; fail <