diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-07 17:27:25 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 22:14:26 +0000 |
commit | d45493f37387ea36757a1749acb22626b4843645 (patch) | |
tree | 4a5153c5faa5d7fb3202385a16bf22d1430c16a4 /dgit | |
parent | 7bff1293fb88d8cd1c3548aaf7a04fdbc12724d3 (diff) |
dgit: import-dsc: Parse `Dgit:' field properly, using only \w+
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5889,9 +5889,10 @@ sub cmd_import_dsc { parse_dscdata(); my $dgit_commit = $dsc->{$ourdscfield[0]}; - if (defined $dgit_commit && - !forceing [qw(import-dsc-with-dgit-field)]) { + if (defined $dgit_commit + && !forceing [qw(import-dsc-with-dgit-field)]) { $dgit_commit =~ m/\w+/ or fail "invalid hash in .dsc"; + $dgit_commit = $&; progress "dgit: import-dsc of .dsc with Dgit field, using git hash"; my @cmd = (qw(sh -ec), "echo $dgit_commit | git cat-file --batch-check"); |