diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-07-01 07:48:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-01 07:48:25 +0800 |
commit | d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3 (patch) | |
tree | 9130f85803274a73f278b335e5fb2a014288a5c7 /modules/indexer | |
parent | 184a7d4195baffb169f24f4e9a4524f8d4045e91 (diff) | |
download | gitea-d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3.tar.gz gitea-d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3.zip |
Fix `dump-repo` git init, fix wrong error type for NullDownloader (#20182)
* Fix `dump-repo` git init
* fix wrong error type for NullDownloader
Diffstat (limited to 'modules/indexer')
-rw-r--r-- | modules/indexer/code/elastic_search.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go index a669c66bb4..7727bfacde 100644 --- a/modules/indexer/code/elastic_search.go +++ b/modules/indexer/code/elastic_search.go @@ -284,7 +284,7 @@ func (b *ElasticSearchIndexer) Index(ctx context.Context, repo *repo_model.Repos reqs := make([]elastic.BulkableRequest, 0) if len(changes.Updates) > 0 { // Now because of some insanity with git cat-file not immediately failing if not run in a valid git directory we need to run git rev-parse first! - if err := git.EnsureValidGitRepository(git.DefaultContext, repo.RepoPath()); err != nil { + if err := git.EnsureValidGitRepository(ctx, repo.RepoPath()); err != nil { log.Error("Unable to open git repo: %s for %-v: %v", repo.RepoPath(), repo, err) return err } |