Skip to content

Commit b4cca45

Browse files
committed
Make updateLocalCopyToCommit as not exported
1 parent 571cba5 commit b4cca45

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

models/repo_branch.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func (repo *Repository) CreateNewBranch(doer *User, oldBranchName, branchName st
9090
return nil
9191
}
9292

93-
// UpdateLocalCopyToCommit pulls latest changes of given commit from repoPath to localPath.
93+
// updateLocalCopyToCommit pulls latest changes of given commit from repoPath to localPath.
9494
// It creates a new clone if local copy does not exist.
9595
// This function checks out target commit by default, it is safe to assume subsequent
9696
// operations are operating against target commit when caller has confidence for no race condition.
97-
func UpdateLocalCopyToCommit(repoPath, localPath, commit string) error {
97+
func updateLocalCopyToCommit(repoPath, localPath, commit string) error {
9898
if !com.IsExist(localPath) {
9999
if err := git.Clone(repoPath, localPath, git.CloneRepoOptions{
100100
Timeout: time.Duration(setting.Git.Timeout.Clone) * time.Second,
@@ -118,9 +118,9 @@ func UpdateLocalCopyToCommit(repoPath, localPath, commit string) error {
118118
return nil
119119
}
120120

121-
// UpdateLocalCopyToCommit makes sure local copy of repository is at given commit.
122-
func (repo *Repository) UpdateLocalCopyToCommit(commit string) error {
123-
return UpdateLocalCopyToCommit(repo.RepoPath(), repo.LocalCopyPath(), commit)
121+
// updateLocalCopyToCommit makes sure local copy of repository is at given commit.
122+
func (repo *Repository) updateLocalCopyToCommit(commit string) error {
123+
return updateLocalCopyToCommit(repo.RepoPath(), repo.LocalCopyPath(), commit)
124124
}
125125

126126
// CreateNewBranchFromCommit creates a new repository branch
@@ -130,7 +130,7 @@ func (repo *Repository) CreateNewBranchFromCommit(doer *User, commit, branchName
130130

131131
localPath := repo.LocalCopyPath()
132132

133-
if err = repo.UpdateLocalCopyToCommit(commit); err != nil {
133+
if err = repo.updateLocalCopyToCommit(commit); err != nil {
134134
return fmt.Errorf("UpdateLocalCopyBranch: %v", err)
135135
}
136136

0 commit comments

Comments
 (0)