summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2014-08-04 01:31:23 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2014-08-04 01:31:23 +0100
commite4fb7e9b2592d0a80ca213c94f3a462abd31c6c8 (patch)
tree554ce129793a48087d68368f3a441175759910a5 /dgit
parent7cb661445122e9ab8a9e0a1f521ae9e502662b84 (diff)
When cloning, set up a remote `vcs-git' from the package's Vcs-Git (and put an appropriate caveat in the manpage). Closes:#740687.
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit4
1 files changed, 4 insertions, 0 deletions
diff --git a/dgit b/dgit
index 5f1ef2e..c8907cf 100755
--- 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";
}