diff options
3 files changed, 13 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 9666ca0..f5f7b38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ dgit (0.22~experimental1) experimental; urgency=low
regression test scripts to use.
* Print better message for unknown operations.
* Provide `dgit clean'. Closes:#736527.
+ * When cloning, set up a remote `vcs-git' from the package's Vcs-Git
+ (and put an appropriate caveat in the manpage). Closes:#740687.
Major new feature, currently stalled awaiting server infrastructure:
* dgit-repos-server: New program for receiving signed-tag-based
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";
diff --git a/dgit.1 b/dgit.1
index 5a00dd7..9f9440f 100644
--- a/dgit.1
+++ b/dgit.1
@@ -59,12 +59,18 @@ The suite's git tip is
left on the local branch
.BI dgit/ suite
ready for work, and on the corresponding dgit remote tracking branch.
-Also, the
.B origin
remote will be set up to point to the package's dgit-repos tree
for the distro to which
.I suite
+For your convenience, the
+.B vcs-git
+remote will be set up from the package's Vcs-Git field, if there is
+one - but note that in the general case the history found there may be
+different to or even disjoint from dgit's view.
\fBdgit fetch\fR [\fIsuite\fP]
Consults the archive and git-repos to update the git view of