summaryrefslogtreecommitdiff
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
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.
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit4
-rw-r--r--dgit.18
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
+The
.B origin
remote will be set up to point to the package's dgit-repos tree
for the distro to which
.I suite
belongs.
+
+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.
.TP
\fBdgit fetch\fR [\fIsuite\fP]
Consults the archive and git-repos to update the git view of