aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorxpy <865934097@qq.com>2022-08-15 11:12:01 +0800
committerGitHub <noreply@github.com>2022-08-14 23:12:01 -0400
commitefaa9958b5a5b90381da439ba78a0abad945703e (patch)
treeeca3df651cf4f6b67538d5ee4781ffe807e62c70 /modules
parent58a4407acb04b329e94e92977b1414feb309d5de (diff)
downloadgitea-efaa9958b5a5b90381da439ba78a0abad945703e.tar.gz
gitea-efaa9958b5a5b90381da439ba78a0abad945703e.zip
Fix push mirror address backend get error Address cause setting page display error (#20593)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/templates/helper.go4
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 {