chiark / gitweb /
dgit: add dgit.default.build-products-dir git configuration key
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 9c58fdf666d181fa07cbe44b14a8c7b1187438cc..adf125abc8086e5062bb2e9f453dda7457ce7a2b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -63,7 +63,7 @@ our @ropts;
 our $sign = 1;
 our $dryrun_level = 0;
 our $changesfile;
-our $buildproductsdir = '..';
+our $buildproductsdir;
 our $new_package = 0;
 our $ignoredirty = 0;
 our $rmonerror = 1;
@@ -3992,7 +3992,7 @@ sub splitbrain_pseudomerge ($$$$) {
         $@ =~ s/^\n//; chomp $@;
        print STDERR <<END;
 $@
-| Not fast forward; maybe --overwrite is needed, see dgit(1)
+| Not fast forward; maybe --overwrite is needed ?  Please see dgit(1).
 END
        finish -1;
     }
@@ -5917,7 +5917,7 @@ sub quilt_fixup_multipatch ($$$) {
 failed to apply your git tree's patch stack (from debian/patches/) to
  the corresponding upstream tarball(s).  Your source tree and .orig
  are probably too inconsistent.  dgit can only fix up certain kinds of
- anomaly (depending on the quilt mode).  See --quilt= in dgit(1).
+ anomaly (depending on the quilt mode).  Please see --quilt= in dgit(1).
 END
     }
 
@@ -7064,6 +7064,9 @@ sub parseopts_late_defaults () {
        badcfg "unknown clean-mode \`$cleanmode'" unless
            $cleanmode =~ m/^($cleanmode_re)$(?!\n)/s;
     }
+
+    $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF');
+    $buildproductsdir //= '..';
 }
 
 if ($ENV{$fakeeditorenv}) {