forked from gitea/gitea

Backport #26340 by @CaiCandong Now, for a new repo without any commit, the Last indexed SHA field looks like this: Before:  After:  fix #26336 Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>