Skip to content

Commit

Permalink
Rename OurGit.GetOriginUrl to GetOriginURL
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Jun 17, 2021
1 parent 2140c4c commit c81bb05
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func migrateProj(oldDir, newDir, oldVer string, wg *sync.WaitGroup) {
basename, projectVersion, _ := parseProjectDirname(projBase)

if projectVersion == oldVer {
originURL, err := gitinst.GetOriginUrl(newDir)
originURL, err := gitinst.GetOriginURL(newDir)
if err != nil {
ourutil.Reportf("Failed to get git origin for %s", newDir)
return
Expand Down
2 changes: 1 addition & 1 deletion common/ourgit/gitutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type OurGit interface {
Fetch(localDir string, what string, opts FetchOptions) error
IsClean(localDir, version string, excludeGlobs []string) (bool, error)
Clone(srcURL, localDir string, opts CloneOptions) error
GetOriginUrl(localDir string) (string, error)
GetOriginURL(localDir string) (string, error)
}

type RefType string
Expand Down
2 changes: 1 addition & 1 deletion common/ourgit/ourgit_gogit.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (m *ourGitGoGit) Clone(srcURL, localDir string, opts CloneOptions) error {
return nil
}

func (m *ourGitGoGit) GetOriginUrl(localDir string) (string, error) {
func (m *ourGitGoGit) GetOriginURL(localDir string) (string, error) {
repo, err := git.PlainOpen(localDir)
if err != nil {
return "", errors.Trace(err)
Expand Down
2 changes: 1 addition & 1 deletion common/ourgit/ourgit_shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (m *ourGitShell) Clone(srcURL, targetDir string, opts CloneOptions) error {
return errors.Trace(err)
}

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

0 comments on commit c81bb05

Please sign in to comment.