aboutsummaryrefslogtreecommitdiffstats
path: root/services/mirror/mirror_push.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/mirror/mirror_push.go')
-rw-r--r--services/mirror/mirror_push.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/services/mirror/mirror_push.go b/services/mirror/mirror_push.go
index 21ba0afeff..02ff97b1f0 100644
--- a/services/mirror/mirror_push.go
+++ b/services/mirror/mirror_push.go
@@ -9,7 +9,6 @@ import (
"fmt"
"io"
"regexp"
- "strings"
"time"
"code.gitea.io/gitea/models/db"
@@ -31,11 +30,6 @@ var stripExitStatus = regexp.MustCompile(`exit status \d+ - `)
func AddPushMirrorRemote(ctx context.Context, m *repo_model.PushMirror, addr string) error {
addRemoteAndConfig := func(addr, path string) error {
cmd := git.NewCommand(ctx, "remote", "add", "--mirror=push").AddDynamicArguments(m.RemoteName, addr)
- if strings.Contains(addr, "://") && strings.Contains(addr, "@") {
- cmd.SetDescription(fmt.Sprintf("remote add %s --mirror=push %s [repo_path: %s]", m.RemoteName, util.SanitizeCredentialURLs(addr), path))
- } else {
- cmd.SetDescription(fmt.Sprintf("remote add %s --mirror=push %s [repo_path: %s]", m.RemoteName, addr, path))
- }
if _, _, err := cmd.RunStdString(&git.RunOpts{Dir: path}); err != nil {
return err
}