summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-08 01:06:53 +0000
committerLauris BH <lauris@nix.lv>2020-01-08 03:06:53 +0200
commit319c92163f1fbe3554e65df71676d05d4b4fa797 (patch)
treebf92570f37080b1445ca3d0019d0ef237e2ebf99 /models
parenta15a644c05d1211e6e306ec2b5f44f71fea4ea24 (diff)
downloadgitea-319c92163f1fbe3554e65df71676d05d4b4fa797.tar.gz
gitea-319c92163f1fbe3554e65df71676d05d4b4fa797.zip
Branches not at ref commit ID should not be listed as Merged (#9614) (#9639)
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
Diffstat (limited to 'models')
-rw-r--r--models/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go
index f93257008b..b81f146371 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -136,7 +136,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
}