aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/bleve.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/code/bleve.go')
-rw-r--r--modules/indexer/code/bleve.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/indexer/code/bleve.go b/modules/indexer/code/bleve.go
index 309b33bedf..1abb3c0219 100644
--- a/modules/indexer/code/bleve.go
+++ b/modules/indexer/code/bleve.go
@@ -191,9 +191,10 @@ func (b *BleveIndexer) addUpdate(ctx context.Context, batchWriter git.WriteClose
size := update.Size
+ var err error
if !update.Sized {
- stdout, err := git.NewCommand(ctx, "cat-file", "-s", update.BlobSha).
- RunInDir(repo.RepoPath())
+ var stdout string
+ stdout, _, err = git.NewCommand(ctx, "cat-file", "-s", update.BlobSha).RunStdString(&git.RunOpts{Dir: repo.RepoPath()})
if err != nil {
return err
}
@@ -210,7 +211,7 @@ func (b *BleveIndexer) addUpdate(ctx context.Context, batchWriter git.WriteClose
return err
}
- _, _, size, err := git.ReadBatchLine(batchReader)
+ _, _, size, err = git.ReadBatchLine(batchReader)
if err != nil {
return err
}