summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2016-11-15 14:16:27 +0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2016-11-15 14:16:27 +0800
commitd9ffe999723366de4bca616f06c7e5944a768044 (patch)
treef9de6de4456c04bccf072ee1084be015983e7480
parent07a0753420f1e97450bb22427abaaf78dc20d31d (diff)
downloadgitea-d9ffe999723366de4bca616f06c7e5944a768044.tar.gz
gitea-d9ffe999723366de4bca616f06c7e5944a768044.zip
fix variable assigned and not used.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
-rw-r--r--models/repo.go2
-rw-r--r--modules/context/repo.go4
2 files changed, 1 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go
index 844fca9a3a..20671cb019 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -2099,7 +2099,7 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit
repoPath, fmt.Sprintf("ForkRepository(git update-server-info): %s", repoPath),
"git", "update-server-info")
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 {
diff --git a/modules/context/repo.go b/modules/context/repo.go
index db808d743e..e3683a1498 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -146,10 +146,6 @@ func RepoAssignment(args ...bool) macaron.Handler {
userName := ctx.Params(":username")
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
if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) {