chiark / gitweb /
dgit: Option parsing: quilt-fixup: Use build_prep_early
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 555e1c00905f30f0da4c18f54ac40c39b8d59ae8..0cac521012390f042ff7ccc8a392d224b17c7c82 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5817,10 +5817,7 @@ END
 
 sub cmd_quilt_fixup {
     badusage "incorrect arguments to dgit quilt-fixup" if @ARGV;
-    my $clogp = parsechangelog();
-    $version = getfield $clogp, 'Version';
-    $package = getfield $clogp, 'Source';
-    check_not_dirty();
+    build_prep_early();
     clean_tree();
     build_maybe_quilt_fixup();
 }
@@ -5889,9 +5886,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");