From e5d8e2d10c6798e57ac855f71b025b087b664799 Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 7 Jan 2020 17:06:14 +0000 Subject: Branches not at ref commit ID should not be listed as Merged (#9614) Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix #9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix #9158 --- models/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/pull.go b/models/pull.go index 9a8777aca3..f86892cbfc 100644 --- a/models/pull.go +++ b/models/pull.go @@ -122,7 +122,7 @@ func (pr *PullRequest) LoadHeadRepo() error { if has, err := x.ID(pr.HeadRepoID).Get(&repo); err != nil { return err } else if !has { - return ErrRepoNotExist{ID: pr.BaseRepoID} + return ErrRepoNotExist{ID: pr.HeadRepoID} } pr.HeadRepo = &repo } -- cgit v1.2.3