Skip to content

Commit b82d748

Browse files
committed
test temp
1 parent 672eb10 commit b82d748

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

routers/api/v1/repo/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ func GetPullRequestFiles(ctx *context.APIContext) {
15671567
return
15681568
}
15691569

1570-
headCommitID, err := baseGitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
1570+
headCommitID, err := baseGitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
15711571
if err != nil {
15721572
ctx.APIErrorInternal(err)
15731573
return

routers/api/v1/repo/pull_review.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func CreatePullReview(ctx *context.APIContext) {
336336
}
337337
defer closer.Close()
338338

339-
headCommitID, err := gitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
339+
headCommitID, err := gitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
340340
if err != nil {
341341
ctx.APIErrorInternal(err)
342342
return
@@ -455,7 +455,7 @@ func SubmitPullReview(ctx *context.APIContext) {
455455
return
456456
}
457457

458-
headCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
458+
headCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDOld(pr.GetGitHeadRefName())
459459
if err != nil {
460460
ctx.APIErrorInternal(err)
461461
return

routers/web/repo/pull.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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.GetRefCommitIDNew(pull.GetGitHeadRefName())
200+
headCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDOld(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.GetRefCommitIDNew(pull.GetGitHeadRefName())
222+
commitSHA, err := ctx.Repo.GitRepo.GetRefCommitIDOld(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.GetRefCommitIDNew(pull.GetGitHeadRefName())
367+
sha, err := baseGitRepo.GetRefCommitIDOld(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.GetRefCommitIDNew(pull.GetGitHeadRefName())
425+
headBranchSha, err = baseGitRepo.GetRefCommitIDOld(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.GetRefCommitIDNew(pull.GetGitHeadRefName())
448+
sha, err := baseGitRepo.GetRefCommitIDOld(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.GetRefCommitIDNew(pull.GetGitHeadRefName())
705+
headCommitID, err := gitRepo.GetRefCommitIDOld(pull.GetGitHeadRefName())
706706
if err != nil {
707707
ctx.ServerError("GetRefCommitID", err)
708708
return

routers/web/repo/pull_review.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func RenderNewCodeCommentForm(ctx *context.Context) {
4949
ctx.Data["PageIsPullFiles"] = true
5050
ctx.Data["Issue"] = issue
5151
ctx.Data["CurrentReview"] = currentReview
52-
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDNew(issue.PullRequest.GetGitHeadRefName())
52+
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDOld(issue.PullRequest.GetGitHeadRefName())
5353
if err != nil {
5454
ctx.ServerError("GetRefCommitID", err)
5555
return
@@ -199,7 +199,7 @@ func renderConversation(ctx *context.Context, comment *issues_model.Comment, ori
199199
ctx.ServerError("comment.Issue.LoadPullRequest", err)
200200
return
201201
}
202-
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDNew(comment.Issue.PullRequest.GetGitHeadRefName())
202+
pullHeadCommitID, err := ctx.Repo.GitRepo.GetRefCommitIDOld(comment.Issue.PullRequest.GetGitHeadRefName())
203203
if err != nil {
204204
ctx.ServerError("GetRefCommitID", err)
205205
return

0 commit comments

Comments
 (0)