chiark / gitweb /
dgit: getfield, parsechangelog: Fix two bugs in error reporting
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Sep 2016 00:05:32 +0000 (01:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Sep 2016 00:36:40 +0000 (01:36 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 625feddafc16502a0fadaa8b31390b2603b01fea..c493eddfd7cbdd97d8a732abb7afbdecc3ec1ab0 100644 (file)
@@ -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 373854eb9c33134da70d8ac30d4abcdd5c411928..54337f73a20cb2d8c61c74326e8b68f81730c59e 100755 (executable)
--- 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 $!;