Browse Source

fix variable assigned and not used.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
tags/v1.0.0
Bo-Yi Wu 7 years ago
parent
commit
d9ffe99972
2 changed files with 1 additions and 5 deletions
  1. 1
    1
      models/repo.go
  2. 0
    4
      modules/context/repo.go

+ 1
- 1
models/repo.go View File

repoPath, fmt.Sprintf("ForkRepository(git update-server-info): %s", repoPath), repoPath, fmt.Sprintf("ForkRepository(git update-server-info): %s", repoPath),
"git", "update-server-info") "git", "update-server-info")
if err != nil { if err != nil {
return nil, fmt.Errorf("git update-server-info: %v", err)
return nil, fmt.Errorf("git update-server-info: %v", stderr)
} }


if err = createUpdateHook(repoPath); err != nil { if err = createUpdateHook(repoPath); err != nil {

+ 0
- 4
modules/context/repo.go View File



userName := ctx.Params(":username") userName := ctx.Params(":username")
repoName := ctx.Params(":reponame") repoName := ctx.Params(":reponame")
refName := ctx.Params(":branchname")
if len(refName) == 0 {
refName = ctx.Params(":path")
}


// Check if the user is the same as the repository owner // Check if the user is the same as the repository owner
if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) { if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) {

Loading…
Cancel
Save