Move commit related functions to gitrepo package (#35600)

This commit is contained in:
Lunny Xiao
2025-12-04 16:20:23 -08:00
committed by GitHub
parent cb5082f8fe
commit 64960a18f9
27 changed files with 467 additions and 446 deletions

View File

@@ -218,7 +218,7 @@ func (b *Indexer) addDelete(filename string, repo *repo_model.Repository, batch
func (b *Indexer) Index(ctx context.Context, repo *repo_model.Repository, sha string, changes *internal.RepoChanges) error {
batch := inner_bleve.NewFlushingBatch(b.inner.Indexer, maxBatchSize)
if len(changes.Updates) > 0 {
gitBatch, err := git.NewBatch(ctx, repo.RepoPath())
gitBatch, err := gitrepo.NewBatch(ctx, repo)
if err != nil {
return err
}