Skip to content

Commit 56a8cf5

Browse files
authored
fix variable assigned and not used. (#173)
Signed-off-by: Bo-Yi Wu <[email protected]>
2 parents 07a0753 + d9ffe99 commit 56a8cf5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

models/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit
20992099
repoPath, fmt.Sprintf("ForkRepository(git update-server-info): %s", repoPath),
21002100
"git", "update-server-info")
21012101
if err != nil {
2102-
return nil, fmt.Errorf("git update-server-info: %v", err)
2102+
return nil, fmt.Errorf("git update-server-info: %v", stderr)
21032103
}
21042104

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

modules/context/repo.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ func RepoAssignment(args ...bool) macaron.Handler {
146146

147147
userName := ctx.Params(":username")
148148
repoName := ctx.Params(":reponame")
149-
refName := ctx.Params(":branchname")
150-
if len(refName) == 0 {
151-
refName = ctx.Params(":path")
152-
}
153149

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

0 commit comments

Comments
 (0)