From 159294f79991ad50747cb5f14c82aadfdc77f2c8 Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 2 May 2019 07:43:20 +0100 Subject: [PATCH] When mirroring we should set the remote to mirror (#6824) --- models/repo_mirror.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }