From: Ian Jackson Date: Tue, 9 Oct 2018 22:46:25 +0000 (+0100) Subject: dgit: Avoid crash if branch_is_gdr finds an origin commit X-Git-Tag: archive/debian/8.0~57 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=38935cb46dedcb9705b0e5e006280a901279975c;ds=sidebyside dgit: Avoid crash if branch_is_gdr finds an origin commit Closes: #910687. Reported-by: Mattia Rizzolo Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 4cc56845..19b9eb2c 100755 --- a/dgit +++ b/dgit @@ -379,6 +379,10 @@ sub branch_is_gdr ($) { printdebug "branch_is_gdr $walk ?-octopus NO\n"; return 0; } + if (!@parents) { + printdebug "branch_is_gdr $walk origin\n"; + return 0; + } if ($get_patches->($walk) ne $tip_patches) { # Our parent added, removed, or edited patches, and wasn't # a gdr make-patches commit. gdr make-patches probably