From d21dabab4e43412858818039a0f81d48445aef7f Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 2 May 2019 20:57:19 +0100 Subject: [PATCH] When mirroring we should set the remote to mirror (#6824) (#6834) --- 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 6205ab3b28e..cdc1f4d95bb 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 }