diff options
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r-- | modules/templates/helper.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 8a15cec2c6..602afec413 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -972,11 +972,11 @@ type remoteAddress struct { Password string } -func mirrorRemoteAddress(ctx context.Context, m *repo_model.Repository, remoteName string) remoteAddress { +func mirrorRemoteAddress(ctx context.Context, m *repo_model.Repository, remoteName string, ignoreOriginalURL bool) remoteAddress { a := remoteAddress{} remoteURL := m.OriginalURL - if remoteURL == "" { + if ignoreOriginalURL || remoteURL == "" { var err error remoteURL, err = git.GetRemoteAddress(ctx, m.RepoPath(), remoteName) if err != nil { |