If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#15583)
If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#15583)

#15546 doesn't completely fix this problem because the error returned is an ObjectNotExist
error not a BranchNotExist error.

Add test for ErrObjectNotExist too

Fix #15257

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>
go-gitea/gitea,cez81/gitea,go-gitea/gitea,cez81/gitea,vdbt/gitea,vdbt/gitea,go-gitea/gitea,cez81/gitea