mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-21 05:42:28 +03:00
16 lines
410 B
Go
16 lines
410 B
Go
|
// 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)
|
||
|
}
|