1
0
Fork 0
forked from forgejo/forgejo

Fix push mirror address backend get error Address cause setting page display error (#20593) (#20901)

This commit is contained in:
zeripath 2022-08-22 07:14:48 +01:00 committed by GitHub
parent 37458bffbf
commit ebc8801fb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -974,11 +974,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 {