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

@@ -148,7 +148,7 @@ func createTag(ctx context.Context, gitRepo *git.Repository, rel *repo_model.Rel
}
rel.Sha1 = commit.ID.String()
rel.NumCommits, err = commit.CommitsCount()
rel.NumCommits, err = gitrepo.CommitsCountOfCommit(ctx, rel.Repo, commit.ID.String())
if err != nil {
return false, fmt.Errorf("CommitsCount: %w", err)
}