chiark / gitweb /
dgit: import-dsc: Parse `Dgit:' field properly, using only \w+
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 31f0da93fe9d4c810c23c3a0460eb17c300aa441..7c282532b044daaf9afd64337c5fcb0418af2499 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -96,7 +96,7 @@ our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?(?:$orig_f_sig_re)?";
 
 our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
 our $splitbraincache = 'dgit-intern/quilt-cache';
-our $rewritemap = 'dgit-rewrite-map';
+our $rewritemap = 'dgit-rewrite/map';
 
 our (@git) = qw(git);
 our (@dget) = qw(dget);
@@ -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");