summaryrefslogtreecommitdiffstats
path: root/modules/gitrepo/walk.go
blob: 8c672ea78b7c1a190c8769dcba8a95735f8de925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package gitrepo

import (
	"context"

	"code.gitea.io/gitea/modules/git"
)

// WalkReferences walks all the references from the repository
func WalkReferences(ctx context.Context, repo Repository, walkfn func(sha1, refname string) error) (int, error) {
	return git.WalkShowRef(ctx, repoPath(repo), nil, 0, 0, walkfn)
}