forked from gitea/gitea

* backport state of 2020-01-14 * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* backport state of 2020-01-14 * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>