aboutsummaryrefslogtreecommitdiff
path: root/internal/db/mirror.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-03-22 00:55:36 +0800
committerGitHub <noreply@github.com>2022-03-22 00:55:36 +0800
commit3c49a6173d9cdf339f4a27d427a4cfc3dd51a24f (patch)
tree4ed73e5a8ea82695a073b74fd9b53a874f7bfca7 /internal/db/mirror.go
parentd66fe583d5f1e0ea5b50aa478ae1dcf3bd69fe7c (diff)
mod: bump github.com/gogs/git-module from 1.2.0 to 1.4.0 (#6866)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'internal/db/mirror.go')
-rw-r--r--internal/db/mirror.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/mirror.go b/internal/db/mirror.go
index 4313d736..58ff8bd1 100644
--- a/internal/db/mirror.go
+++ b/internal/db/mirror.go
@@ -128,7 +128,7 @@ func (m *Mirror) RawAddress() string {
func (m *Mirror) SaveAddress(addr string) error {
repoPath := m.Repo.RepoPath()
- err := git.RepoRemoveRemote(repoPath, "origin")
+ err := git.RemoteRemove(repoPath, "origin")
if err != nil {
return fmt.Errorf("remove remote 'origin': %v", err)
}
@@ -138,7 +138,7 @@ func (m *Mirror) SaveAddress(addr string) error {
return err
}
- err = git.RepoAddRemote(repoPath, "origin", addrURL.String(), git.AddRemoteOptions{MirrorFetch: true})
+ err = git.RemoteAdd(repoPath, "origin", addrURL.String(), git.RemoteAddOptions{MirrorFetch: true})
if err != nil {
return fmt.Errorf("add remote 'origin': %v", err)
}