From: Ian Jackson Date: Mon, 4 Aug 2014 00:31:23 +0000 (+0100) Subject: When cloning, set up a remote `vcs-git' from the package's Vcs-Git (and put an approp... X-Git-Tag: debian/0.22~14 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=e4fb7e9b2592d0a80ca213c94f3a462abd31c6c8;hp=7cb661445122e9ab8a9e0a1f521ae9e502662b84 When cloning, set up a remote `vcs-git' from the package's Vcs-Git (and put an appropriate caveat in the manpage). Closes:#740687. --- diff --git a/debian/changelog b/debian/changelog index 9666ca01..f5f7b387 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 5f1ef2e5..c8907cf6 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 5a00dd77..9f9440f9 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