chiark / gitweb /
dgit: build_source: Drop call to build_prep_early
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3afaf193a4127e320ce611162b9f5f896086350f..d948e622cb53d7ff8d381e03d43b239d4c08ee70 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4756,6 +4756,8 @@ sub cmd_push {
     dopush();
 }
 
+our $sourcechanges;
+
 sub cmd_push_source {
     prep_push();
     fail "dgit push-source: --include-dirty/--ignore-dirty does not make".
@@ -4768,7 +4770,10 @@ sub cmd_push_source {
         }
     } else {
         # Building a source package is very fast, so just do it
-        build_source_for_push();
+       build_source();
+       die "er, patches are applied dirtily but shouldn't be.."
+           if $patches_applied_dirtily;
+       $changesfile = $sourcechanges;
     }
     dopush();
 }
@@ -5062,7 +5067,6 @@ sub i_want_signed_dsc_changes {
 #---------- building etc. ----------
 
 our $version;
-our $sourcechanges;
 our $dscfn;
 
 #----- `3.0 (quilt)' handling -----
@@ -6408,14 +6412,7 @@ sub cmd_gbp_build {
 }
 sub cmd_git_build { cmd_gbp_build(); } # compatibility with <= 1.0
 
-sub build_source_for_push {
-    build_source();
-    maybe_unapply_patches_again();
-    $changesfile = $sourcechanges;
-}
-
 sub build_source {
-    build_prep_early();
     build_prep();
     $sourcechanges = changespat $version,'source';
     if (act_local()) {