Do not always compute the list of diff commits
If the repo has a branch but no main branch (defaults to master), then
we end up going through all the commits of the branch and say that they
aren't in the main branch, which make sense since there are no main
branch. But this leads to an error when trying to build the URL to open
the pull-request between that main branch and the current one.
So if there are no main branch, don't compute the list of different
commits and don't show the notification about potential PR, just show
the list of commits as if it was all good.
Fixes https://pagure.io/pagure/issue/1441