Skip to content

Commit c81bb05

Browse files
committed
Rename OurGit.GetOriginUrl to GetOriginURL
1 parent 2140c4c commit c81bb05

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cli/update/update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ func migrateProj(oldDir, newDir, oldVer string, wg *sync.WaitGroup) {
405405
basename, projectVersion, _ := parseProjectDirname(projBase)
406406

407407
if projectVersion == oldVer {
408-
originURL, err := gitinst.GetOriginUrl(newDir)
408+
originURL, err := gitinst.GetOriginURL(newDir)
409409
if err != nil {
410410
ourutil.Reportf("Failed to get git origin for %s", newDir)
411411
return

common/ourgit/gitutils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type OurGit interface {
1414
Fetch(localDir string, what string, opts FetchOptions) error
1515
IsClean(localDir, version string, excludeGlobs []string) (bool, error)
1616
Clone(srcURL, localDir string, opts CloneOptions) error
17-
GetOriginUrl(localDir string) (string, error)
17+
GetOriginURL(localDir string) (string, error)
1818
}
1919

2020
type RefType string

common/ourgit/ourgit_gogit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (m *ourGitGoGit) Clone(srcURL, localDir string, opts CloneOptions) error {
348348
return nil
349349
}
350350

351-
func (m *ourGitGoGit) GetOriginUrl(localDir string) (string, error) {
351+
func (m *ourGitGoGit) GetOriginURL(localDir string) (string, error) {
352352
repo, err := git.PlainOpen(localDir)
353353
if err != nil {
354354
return "", errors.Trace(err)

common/ourgit/ourgit_shell.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (m *ourGitShell) Clone(srcURL, targetDir string, opts CloneOptions) error {
211211
return errors.Trace(err)
212212
}
213213

214-
func (m *ourGitShell) GetOriginUrl(localDir string) (string, error) {
214+
func (m *ourGitShell) GetOriginURL(localDir string) (string, error) {
215215
resp, err := m.shellGit(localDir, "remote", "get-url", "origin")
216216
if err != nil {
217217
return "", errors.Annotatef(err, "failed to get origin URL")

0 commit comments

Comments
 (0)