diff options
author | Unknwon <u@gogs.io> | 2016-08-24 21:35:03 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-24 21:35:03 -0700 |
commit | f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86 (patch) | |
tree | 21ee3e7965c77c16fcdaa209f01cebae6a809625 /models/repo.go | |
parent | 67fb0fe6a5783f772abfb5438a154435dafff4de (diff) | |
download | gitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.tar.gz gitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.zip |
Web editor: improve code quality
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go index c8ac584883..728f8c59e4 100644 --- a/models/repo.go +++ b/models/repo.go @@ -2260,7 +2260,7 @@ func (repo *Repository) GetForks() ([]*Repository, error) { // // uploadRepoFiles uploads new files to repository. -func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, treeName, message string, uuids []string) (err error) { +func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, treePath, message string, uuids []string) (err error) { repoWorkingPool.CheckIn(com.ToStr(repo.ID)) defer repoWorkingPool.CheckOut(com.ToStr(repo.ID)) @@ -2276,7 +2276,7 @@ func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, t repo.CheckoutNewBranch(oldBranchName, branchName) } - dirPath := path.Join(localPath, treeName) + dirPath := path.Join(localPath, treePath) os.MkdirAll(dirPath, os.ModePerm) // Copy uploaded files into repository. @@ -2298,7 +2298,7 @@ func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, t } if len(message) == 0 { - message = "Add files to '" + treeName + "'" + message = "Add files to '" + treePath + "'" } if err = git.AddChanges(localPath, true); err != nil { |