summaryrefslogtreecommitdiffstats
path: root/routers/repo/pull.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-26 17:33:45 -0500
committerUnknwon <u@gogs.io>2015-11-26 17:33:45 -0500
commitc50a3503e6e8ece0dabd109932a72fe093c3cab3 (patch)
treed9918c4b9c5d5efc94771cae22231fdcc0796102 /routers/repo/pull.go
parent2b10fdc4dcb987b347b031f460cf4f02fd48a31a (diff)
downloadgitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.tar.gz
gitea-c50a3503e6e8ece0dabd109932a72fe093c3cab3.zip
introduce git-shell
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r--routers/repo/pull.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index d7b4828a91..8d6b4c7d7b 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -210,13 +210,7 @@ func PrepareViewPullInfo(ctx *middleware.Context, pull *models.Issue) *git.PullR
}
if pull.HeadRepo != nil {
- headRepoPath, err := pull.HeadRepo.RepoPath()
- if err != nil {
- ctx.Handle(500, "HeadRepo.RepoPath", err)
- return nil
- }
-
- headGitRepo, err = git.OpenRepository(headRepoPath)
+ headGitRepo, err = git.OpenRepository(pull.HeadRepo.RepoPath())
if err != nil {
ctx.Handle(500, "OpenRepository", err)
return nil
@@ -496,11 +490,7 @@ func PrepareCompareDiff(
)
// Get diff information.
- ctx.Data["CommitRepoLink"], err = headRepo.RepoLink()
- if err != nil {
- ctx.Handle(500, "RepoLink", err)
- return false
- }
+ ctx.Data["CommitRepoLink"] = headRepo.RepoLink()
headCommitID, err := headGitRepo.GetCommitIdOfBranch(headBranch)
if err != nil {