summaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-05-02 07:43:20 +0100
committerLauris BH <lauris@nix.lv>2019-05-02 09:43:20 +0300
commit159294f79991ad50747cb5f14c82aadfdc77f2c8 (patch)
tree1ecb63db384a16363be8ed14e876cc417697c6b6 /models/repo_mirror.go
parent897927690f5708d48f11dcd4f29358fbc98851bd (diff)
downloadgitea-159294f79991ad50747cb5f14c82aadfdc77f2c8.tar.gz
gitea-159294f79991ad50747cb5f14c82aadfdc77f2c8.zip
When mirroring we should set the remote to mirror (#6824)
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index b63fba5741..b58fa05dfe 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -128,7 +128,7 @@ func (m *Mirror) SaveAddress(addr string) error {
return err
}
- _, err = git.NewCommand("remote", "add", "origin", addr).RunInDir(repoPath)
+ _, err = git.NewCommand("remote", "add", "origin", "--mirror=fetch", addr).RunInDir(repoPath)
return err
}