summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-30 22:04:27 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-30 22:46:35 +0000
commit4111b99a0edc2040ada8e9f2998f7c68ba397a97 (patch)
tree7e37b27e25398d43472ace46142dc296bee2e5bb /dgit
parentd9d6f6bd791bded81431beb335ff789ae3a74e16 (diff)
-p option: Check against changelog
If -p is specified during push, we check that it's right. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit5
1 files changed, 4 insertions, 1 deletions
diff --git a/dgit b/dgit
index aab59b3..8264f3e 100755
--- a/dgit
+++ b/dgit
@@ -3200,7 +3200,10 @@ sub push_parse_changelog ($) {
my $clogp = Dpkg::Control::Hash->new();
$clogp->load($clogpfn) or die;
- $package = getfield $clogp, 'Source';
+ my $clogpackage = getfield $clogp, 'Source';
+ $package //= $clogpackage;
+ fail "-p specified $package but changelog specified $clogpackage"
+ unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
my $tag = debiantag($cversion, access_basedistro);
runcmd @git, qw(check-ref-format), $tag;