chiark / gitweb /
Documentation: dgit(1): Remove some obsolete caveats from BUGS.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3ef43485ffe088b1ef5cc7bf87e990de143d8a24..079e5dec7c212c0c4ea1be9ecb76f4891af75cfb 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -448,6 +448,7 @@ our %defcfg = ('dgit.default.distro' => 'debian',
               'dgit-distro.debian.git-user-force' => 'dgit',
               'dgit-distro.debian.git-proto' => 'git+ssh://',
               'dgit-distro.debian.git-path' => '/dgit/debian/repos',
+              'dgit-distro.debian.git-create' => 'true',
               'dgit-distro.debian.git-check' => 'ssh-cmd',
  'dgit-distro.debian.archive-query-url', 'https://api.ftp-master.debian.org/',
 # 'dgit-distro.debian.archive-query-tls-key',
@@ -1020,7 +1021,7 @@ sub check_for_git () {
            my ($usedistro,) = access_distros();
            $instead_distro= cfg("dgit-distro.$usedistro.diverts.$divert");
            $instead_distro =~ s{^/}{ access_basedistro()."/" }e;
-           printdebug "diverting $divert so using distro $instead_distro\n";
+           progress "diverting to $divert (using config for $instead_distro)";
            return check_for_git();
        }
        failedcmd @cmd unless $r =~ m/^[01]$/;
@@ -1347,7 +1348,7 @@ sub git_fetch_us () {
     push @specs,
         map { "+refs/$_/*:".lrfetchrefs."/$_/*" }
         qw(tags heads);
-    runcmd_ordryrun_local @git, qw(fetch -p -n), access_giturl(), @specs;
+    runcmd_ordryrun_local @git, qw(fetch -p -n -q), access_giturl(), @specs;
 
     my %here;
     my $tagpat = debiantag('*',access_basedistro);
@@ -1822,7 +1823,6 @@ sub dopush ($) {
     my $tag_obj_hash = cmdoutput @git, qw(hash-object -w -t tag), $tagobjfn;
     runcmd_ordryrun @git, qw(verify-tag), $tag_obj_hash;
     runcmd_ordryrun_local @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
-    runcmd_ordryrun @git, qw(tag -v --), $tag;
 
     if (!check_for_git()) {
        create_remote_git_repo();
@@ -2635,6 +2635,8 @@ sub clean_tree () {
        runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
     } elsif ($cleanmode eq 'git') {
        runcmd_ordryrun_local @git, qw(clean -xdf);
+    } elsif ($cleanmode eq 'git-ff') {
+       runcmd_ordryrun_local @git, qw(clean -xdff);
     } elsif ($cleanmode eq 'none') {
     } else {
        die "$cleanmode ?";
@@ -2753,7 +2755,7 @@ sub cmd_sbuild {
     changedir "..";
     my $pat = "${package}_".(stripepoch $version)."_*.changes";
     if (act_local()) {
-       stat_exist $dscfn or fail "$dscfn (in parent directory): $!";
+       stat_exists $dscfn or fail "$dscfn (in parent directory): $!";
        stat_exists $sourcechanges
            or fail "$sourcechanges (in parent directory): $!";
        foreach my $cf (glob $pat) {
@@ -2871,7 +2873,7 @@ sub parseopts () {
            } elsif (m/^--build-products-dir=(.*)/s) {
                push @ropts, $_;
                $buildproductsdir = $1;
-           } elsif (m/^--clean=(dpkg-source|git|none)$/s) {
+           } elsif (m/^--clean=(dpkg-source|git|git-ff|none)$/s) {
                push @ropts, $_;
                $cleanmode = $1;
            } elsif (m/^--clean=(.*)$/s) {
@@ -2943,6 +2945,9 @@ sub parseopts () {
                } elsif (s/^-wg$//s) {
                    push @ropts, $&;
                    $cleanmode = 'git';
+               } elsif (s/^-wgf$//s) {
+                   push @ropts, $&;
+                   $cleanmode = 'git-ff';
                } elsif (s/^-wd$//s) {
                    push @ropts, $&;
                    $cleanmode = 'dpkg-source';