mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 17:04:27 +01:00
a21128a734
See https://codeberg.org/forgejo/discussions/issues/164 for the rationale and discussion of this change. Everything related to the `go-git` dependency is dropped (Only a single instance is left in a test file to test for an XSS, it requires crafting an commit that Git itself refuses to craft). `_gogit` files have been removed entirely, `go:build: !gogit` is removed, `XXX_nogogit.go` files either have been renamed or had their code being merged into the `XXX.go` file.
15 lines
410 B
Go
15 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)
|
|
}
|