chiark / gitweb /
solit brain: Do not crash in when the two brains are actually identical.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Oct 2016 11:52:19 +0000 (12:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Oct 2016 11:52:25 +0000 (12:52 +0100)
The dgit-view ref is created by quiltify_splitbrain_needed, which is
not always called.  But, quiltify_splitbrain_needed's other function
is to switch branches.  If it was called then HEAD will refer to
dgit-view.  If it wasn't then the original HEAD is fine.

Closes:#841770.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 75515ee2577ea771e7f492228151f2289e045994..c0c45a1c15f83a8867ced611a9c58baefe254bf4 100644 (file)
@@ -6,6 +6,8 @@ dgit (2.5~) unstable; urgency=medium
     and improve performance by amortising gnupg migration cost.
   * Switch to new archive/ tag format by default, even in
     non-split-brain mode.
+  * Do not crash in split brain quilt modes when the two brains are
+    actually identical.  Closes:#841770.
 
  --
 
diff --git a/dgit b/dgit
index 6cdf8d28a699070b84eb0cf1fca283f635ff2f23..5ee61ef95567a5d851f7d8ae4f0f81525ce04cf8 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3909,7 +3909,7 @@ Commit patch to update .gitignore
 END
     }
 
-    my $dgitview = git_rev_parse 'refs/heads/dgit-view';
+    my $dgitview = git_rev_parse 'HEAD';
 
     changedir '../../../..';
     # When we no longer need to support squeeze, use --create-reflog