summaryrefslogtreecommitdiffstats
path: root/modules/indexer/code
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-19 21:40:42 +0800
committerGitHub <noreply@github.com>2023-04-19 21:40:42 +0800
commite422342eebc18034ef586ec58f1e2fff0340091d (patch)
tree307264b46c1683915429083d54e9634ee4f2fc4d /modules/indexer/code
parent01214c8ada993bf5f54a4149979d140443d69410 (diff)
downloadgitea-e422342eebc18034ef586ec58f1e2fff0340091d.tar.gz
gitea-e422342eebc18034ef586ec58f1e2fff0340091d.zip
Allow adding new files to an empty repo (#24164)
![image](https://user-images.githubusercontent.com/2114189/232561612-2bfcfd0a-fc04-47ba-965f-5d0bcea46c54.png)
Diffstat (limited to 'modules/indexer/code')
-rw-r--r--modules/indexer/code/indexer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/indexer/code/indexer.go b/modules/indexer/code/indexer.go
index 027d13555c..2c493ccf94 100644
--- a/modules/indexer/code/indexer.go
+++ b/modules/indexer/code/indexer.go
@@ -154,7 +154,9 @@ func Init() {
log.Trace("IndexerData Process Repo: %d", indexerData.RepoID)
if err := index(ctx, indexer, indexerData.RepoID); err != nil {
- log.Error("index: %v", err)
+ if !setting.IsInTesting {
+ log.Error("indexer index error for repo %v: %v", indexerData.RepoID, err)
+ }
if indexer.Ping() {
continue
}