@@ -197,7 +197,7 @@ func GetPullDiffStats(ctx *context.Context) {
197197	}
198198
199199	// do not report 500 server error to end users if error occurs, otherwise a PR missing ref won't be able to view. 
200- 	headCommitID , err  :=  ctx .Repo .GitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
200+ 	headCommitID , err  :=  ctx .Repo .GitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
201201	if  err  !=  nil  {
202202		log .Error ("Failed to GetRefCommitID: %v, repo: %v" , err , ctx .Repo .Repository .FullName ())
203203		return 
@@ -219,7 +219,7 @@ func GetMergedBaseCommitID(ctx *context.Context, issue *issues_model.Issue) stri
219219	if  pull .MergeBase  ==  ""  {
220220		var  commitSHA , parentCommit  string 
221221		// If there is a head or a patch file, and it is readable, grab info 
222- 		commitSHA , err  :=  ctx .Repo .GitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
222+ 		commitSHA , err  :=  ctx .Repo .GitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
223223		if  err  !=  nil  {
224224			// Head File does not exist, try the patch 
225225			commitSHA , err  =  ctx .Repo .GitRepo .ReadPatchCommit (pull .Index )
@@ -364,7 +364,7 @@ func prepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *pull_
364364		ctx .Data ["BaseTarget" ] =  pull .BaseBranch 
365365		ctx .Data ["HeadTarget" ] =  pull .HeadBranch 
366366
367- 		sha , err  :=  baseGitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
367+ 		sha , err  :=  baseGitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
368368		if  err  !=  nil  {
369369			ctx .ServerError (fmt .Sprintf ("GetRefCommitID(%s)" , pull .GetGitHeadRefName ()), err )
370370			return  nil 
@@ -422,7 +422,7 @@ func prepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *pull_
422422
423423		if  headBranchExist  {
424424			if  pull .Flow  !=  issues_model .PullRequestFlowGithub  {
425- 				headBranchSha , err  =  baseGitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
425+ 				headBranchSha , err  =  baseGitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
426426			} else  {
427427				headBranchSha , err  =  headGitRepo .GetBranchCommitID (pull .HeadBranch )
428428			}
@@ -445,7 +445,7 @@ func prepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *pull_
445445		ctx .Data ["GetCommitMessages" ] =  "" 
446446	}
447447
448- 	sha , err  :=  baseGitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
448+ 	sha , err  :=  baseGitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
449449	if  err  !=  nil  {
450450		if  git .IsErrNotExist (err ) {
451451			ctx .Data ["IsPullRequestBroken" ] =  true 
@@ -702,7 +702,7 @@ func viewPullFiles(ctx *context.Context, beforeCommitID, afterCommitID string) {
702702		return 
703703	}
704704
705- 	headCommitID , err  :=  gitRepo .GetRefCommitIDOld (pull .GetGitHeadRefName ())
705+ 	headCommitID , err  :=  gitRepo .GetRefCommitIDNew (pull .GetGitHeadRefName ())
706706	if  err  !=  nil  {
707707		ctx .ServerError ("GetRefCommitID" , err )
708708		return 
0 commit comments