chiark / gitweb /
dgit: do not crash on push of a new gdr package. Closes:#906784.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 21 Aug 2018 01:08:39 +0000 (02:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 21 Aug 2018 01:08:41 +0000 (02:08 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 8711080..29ff56e 100644 (file)
@@ -1,6 +1,6 @@
 dgit (6.9~) unstable; urgency=medium
 
-  * 
+  * dgit: do not crash on push of a new gdr package.  Closes:#906784.
 
  --
 
diff --git a/dgit b/dgit
index e752108..f06087d 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -311,7 +311,7 @@ sub branch_is_gdr_unstitched_ff ($$$) {
     my ($symref, $head, $ancestor) = @_;
     my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $head);
     return 0 unless $ffq_prev;
-    return 0 unless is_fast_fwd $ancestor, $ffq_prev;
+    return 0 unless !defined $ancestor or is_fast_fwd $ancestor, $ffq_prev;
     return 1;
 }