From: Ian Jackson Date: Mon, 26 Sep 2016 00:05:32 +0000 (+0100) Subject: dgit: getfield, parsechangelog: Fix two bugs in error reporting X-Git-Tag: archive/debian/2.0~112 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=691b12e13974d68966a397186cc5e310e5582f0f;p=dgit.git dgit: getfield, parsechangelog: Fix two bugs in error reporting Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 625fedda..c493eddf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,6 +51,7 @@ dgit (1.5~~) unstable; urgency=medium * When synthesing a commit from a .dsc from the archive, stop internal git reset from printing a confusing message about HEAD. * Turn off git gc in the private working areas. + * Fix a couple of bugs in error reporting. Test suite: * When sbuild fails, do not crash due to sed not finding the log diff --git a/dgit b/dgit index 373854eb..54337f73 100755 --- a/dgit +++ b/dgit @@ -872,11 +872,11 @@ sub getfield ($$) { my ($dctrl,$field) = @_; my $v = $dctrl->{$field}; return $v if defined $v; - fail "missing field $field in ".$v->get_option('name'); + fail "missing field $field in ".$dctrl->get_option('name'); } sub parsechangelog { - my $c = Dpkg::Control::Hash->new(); + my $c = Dpkg::Control::Hash->new(name => 'parsed changelog'); my $p = new IO::Handle; my @cmd = (qw(dpkg-parsechangelog), @_); open $p, '-|', @cmd or die $!;