chiark / gitweb /
dsc import: Call resolve_dsc_field_commit
[dgit.git] / dgit
diff --git a/dgit b/dgit
index af9b182fcf5e7952479d8778f517f6da53e4f272..3ffcf77a7198501037d8566ee8a96722b2ef2b58 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2769,7 +2769,8 @@ sub resolve_dsc_field_commit ($$) {
     return unless defined $dsc_hash;
 
     my $mapref =
-       $already_distro eq $dsc_distro || !$chase_dsc_distro 
+       defined $already_mapref &&
+       ($already_distro eq $dsc_distro || !$chase_dsc_distro)
        ? $already_mapref : undef;
 
     my $do_fetch;
@@ -6029,6 +6030,9 @@ sub cmd_import_dsc {
 
     if (defined $dsc_hash) {
        progress "dgit: import-dsc of .dsc with Dgit field, using git hash";
+       resolve_dsc_field_commit undef, undef;
+    }
+    if (defined $dsc_hash) {
        my @cmd = (qw(sh -ec),
                   "echo $dsc_hash | git cat-file --batch-check");
        my $objgot = cmdoutput @cmd;