gitea源码

123456789101112131415161718
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. //go:build !gogit
  4. package gitrepo
  5. import (
  6. "context"
  7. "code.gitea.io/gitea/modules/git"
  8. )
  9. // WalkReferences walks all the references from the repository
  10. func WalkReferences(ctx context.Context, repo Repository, walkfn func(sha1, refname string) error) (int, error) {
  11. return git.WalkShowRef(ctx, repoPath(repo), nil, 0, 0, walkfn)
  12. }