MCPcopy Create free account
hub / github.com/gogs/gogs / RepositoryPath

Function RepositoryPath

internal/repoutil/repoutil.go:59–62  ·  view source on GitHub ↗

RepositoryPath returns the absolute path using given user and repository name.

(owner, repo string)

Source from the content-addressed store, hash-verified

57// RepositoryPath returns the absolute path using given user and repository
58// name.
59func RepositoryPath(owner, repo string) string {
60 // 🚨 SECURITY: Prevent path traversal in repository name.
61 return filepath.Join(UserPath(owner), pathutil.Clean(strings.ToLower(repo))+".git")
62}
63
64// RepositoryLocalPath returns the absolute path of the repository local copy
65// with the given ID.

Callers 6

MirrorSyncPushMethod · 0.92
CommitRepoMethod · 0.92
RepoGitBlobFunction · 0.92
GetContentsFunction · 0.92
PutContentsFunction · 0.92
TestRepositoryPathFunction · 0.85

Calls 2

CleanFunction · 0.92
UserPathFunction · 0.85

Tested by 1

TestRepositoryPathFunction · 0.68