summaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/code/git.go')
-rw-r--r--modules/indexer/code/git.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/indexer/code/git.go b/modules/indexer/code/git.go
index 76cd78e11e..f105d032eb 100644
--- a/modules/indexer/code/git.go
+++ b/modules/indexer/code/git.go
@@ -91,11 +91,9 @@ func genesisChanges(ctx context.Context, repo *repo_model.Repository, revision s
return nil, runErr
}
+ objectFormat := git.ObjectFormatFromName(repo.ObjectFormatName)
+
var err error
- objectFormat, err := git.GetObjectFormatOfRepo(ctx, repo.RepoPath())
- if err != nil {
- return nil, err
- }
changes.Updates, err = parseGitLsTreeOutput(objectFormat, stdout)
return &changes, err
}
@@ -174,10 +172,8 @@ func nonGenesisChanges(ctx context.Context, repo *repo_model.Repository, revisio
return nil, err
}
- objectFormat, err := git.GetObjectFormatOfRepo(ctx, repo.RepoPath())
- if err != nil {
- return nil, err
- }
+ objectFormat := git.ObjectFormatFromName(repo.ObjectFormatName)
+
changes.Updates, err = parseGitLsTreeOutput(objectFormat, lsTreeStdout)
return &changes, err
}