@@ -90,11 +90,11 @@ func (repo *Repository) CreateNewBranch(doer *User, oldBranchName, branchName st
90
90
return nil
91
91
}
92
92
93
- // UpdateLocalCopyToCommit pulls latest changes of given commit from repoPath to localPath.
93
+ // updateLocalCopyToCommit pulls latest changes of given commit from repoPath to localPath.
94
94
// It creates a new clone if local copy does not exist.
95
95
// This function checks out target commit by default, it is safe to assume subsequent
96
96
// 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 {
98
98
if ! com .IsExist (localPath ) {
99
99
if err := git .Clone (repoPath , localPath , git.CloneRepoOptions {
100
100
Timeout : time .Duration (setting .Git .Timeout .Clone ) * time .Second ,
@@ -118,9 +118,9 @@ func UpdateLocalCopyToCommit(repoPath, localPath, commit string) error {
118
118
return nil
119
119
}
120
120
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 )
124
124
}
125
125
126
126
// CreateNewBranchFromCommit creates a new repository branch
@@ -130,7 +130,7 @@ func (repo *Repository) CreateNewBranchFromCommit(doer *User, commit, branchName
130
130
131
131
localPath := repo .LocalCopyPath ()
132
132
133
- if err = repo .UpdateLocalCopyToCommit (commit ); err != nil {
133
+ if err = repo .updateLocalCopyToCommit (commit ); err != nil {
134
134
return fmt .Errorf ("UpdateLocalCopyBranch: %v" , err )
135
135
}
136
136
0 commit comments