diff options
author | zeripath <art27@cantab.net> | 2019-04-09 21:45:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-09 21:45:58 +0100 |
commit | 89cc7c646deea10666fd7dc09c485e7910675cce (patch) | |
tree | b58c1d778e920e9fe46d175ce7e6d28f77dc8fd2 /templates/repo/pulls | |
parent | 7350e439bfa580d6693eac9848353e83e51a3525 (diff) | |
download | gitea-89cc7c646deea10666fd7dc09c485e7910675cce.tar.gz gitea-89cc7c646deea10666fd7dc09c485e7910675cce.zip |
Prevent server 500 on compare branches with no common history (#6555)
* Prevent 500 if there is no common mergebase
* Prevent creation of PR with no history
Diffstat (limited to 'templates/repo/pulls')
-rw-r--r-- | templates/repo/pulls/compare.tmpl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index d2e00ace36..2296acf1df 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -54,6 +54,9 @@ <div class="ui segment"> {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} </div> + {{else if eq .CommitCount 0 }} + {{template "repo/commits_table" .}} + {{template "repo/diff/box" .}} {{else}} {{template "repo/issue/new_form" .}} {{template "repo/commits_table" .}} |