chiark / gitweb /
When cloning, set up a remote `vcs-git' from the package's Vcs-Git (and put an approp...
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 2852e134289d3e4076c917e0c349d8e208953eaf..c8907cf6eb48739a2f53854c46cf54cb641ba79c 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1261,6 +1261,10 @@ sub clone ($) {
        progress "starting new git history";
     }
     fetch_from_archive() or no_such_package;
+    my $vcsgiturl = $dsc->{'Vcs-Git'};
+    if (length $vcsgiturl) {
+       runcmd @git, qw(remote add vcs-git), $vcsgiturl;
+    }
     runcmd @git, qw(reset --hard), lrref();
     printdone "ready for work in $dstdir";
 }
@@ -1948,6 +1952,11 @@ sub clean_tree () {
     }
 }
 
+sub cmd_clean () {
+    badusage "clean takes no additional arguments" if @ARGV;
+    clean_tree();
+}
+
 sub build_prep () {
     badusage "-p is not allowed when building" if defined $package;
     check_not_dirty();