chiark / gitweb /
dgit clone: No longer create an "origin" remote
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jul 2019 22:58:01 +0000 (23:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jul 2019 23:46:13 +0000 (00:46 +0100)
This was a normal git remote pointing to the dgit git server.

This is not really sensible because
1. it can't simply be pushed to
2. sometimes (if the package was never pushed with dgit)
    it doesn't even exist
3. it may be out of date with respect to the archive

The effect of 2 is that it can break `git remote update'.

This "git remote add" was introduced in 2013 in
  39c6c123ab730d42ec7c9ed01c30e0175c7691e7
  fix branch usage
and was first included in 0.2.  There doesn't seem to be any evidence
of me having deeply considered the merits of this at the time.

Closes: #932694
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 2d6eb858f91703ae29f4dd7889049cc56a280cad..cde85468cfcad54ec99661f9d0ec0d02c2572c4e 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3882,14 +3882,9 @@ sub clone ($) {
     record_maindir();
     setup_new_tree();
     clone_set_head();
-    my $giturl = access_giturl(1);
-    if (defined $giturl) {
-       runcmd @git, qw(remote add), 'origin', $giturl;
-    }
     if ($hasgit) {
        progress __ "fetching existing git history";
        git_fetch_us();
-       runcmd_ordryrun_local @git, qw(fetch origin);
     } else {
        progress __ "starting new git history";
     }