summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-09 23:46:25 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 00:58:03 +0100
commit38935cb46dedcb9705b0e5e006280a901279975c (patch)
tree1f30d69132a000277828fb2efe709252d6713c0c
parent8ac9071b25d42de4f1f6b9ade2f8d36d8d91b135 (diff)
dgit: Avoid crash if branch_is_gdr finds an origin commit
Closes: #910687. Reported-by: Mattia Rizzolo <mattia@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit4
1 files changed, 4 insertions, 0 deletions
diff --git a/dgit b/dgit
index 4cc5684..19b9eb2 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