File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -51,19 +51,6 @@ func RefBlame(ctx *context.Context) {
51
51
repoName := ctx .Repo .Repository .Name
52
52
commitID := ctx .Repo .CommitID
53
53
54
- commit , err := ctx .Repo .GitRepo .GetCommit (commitID )
55
- if err != nil {
56
- if git .IsErrNotExist (err ) {
57
- ctx .NotFound ("Repo.GitRepo.GetCommit" , err )
58
- } else {
59
- ctx .ServerError ("Repo.GitRepo.GetCommit" , err )
60
- }
61
- return
62
- }
63
- if len (commitID ) != 40 {
64
- commitID = commit .ID .String ()
65
- }
66
-
67
54
branchLink := ctx .Repo .RepoLink + "/src/" + ctx .Repo .BranchNameSubURL ()
68
55
treeLink := branchLink
69
56
rawLink := ctx .Repo .RepoLink + "/raw/" + ctx .Repo .BranchNameSubURL ()
@@ -148,7 +135,7 @@ func RefBlame(ctx *context.Context) {
148
135
previousCommits := make (map [string ]string )
149
136
commits := list .New ()
150
137
commitCache := map [string ]* git.Commit {}
151
- commitCache [commitID ] = commit
138
+ commitCache [ctx . Repo . Commit . ID . String () ] = ctx . Repo . Commit
152
139
153
140
for _ , part := range blameParts {
154
141
sha := part .Sha
You can’t perform that action at this time.
0 commit comments