From: Ian Jackson Date: Sat, 7 Jan 2017 17:27:25 +0000 (+0000) Subject: dgit: import-dsc: Parse `Dgit:' field properly, using only \w+ X-Git-Tag: archive/debian/3.0~95 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=d45493f37387ea36757a1749acb22626b4843645 dgit: import-dsc: Parse `Dgit:' field properly, using only \w+ Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 555e1c00..7c282532 100755 --- a/dgit +++ b/dgit @@ -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");