MCPcopy Create free account
hub / github.com/go-git/go-git / PlainOpen

Function PlainOpen

repository.go:297–299  ·  view source on GitHub ↗

PlainOpen opens a git repository from the given path. It detects if the repository is bare or a normal one. If the path doesn't contain a valid repository ErrRepositoryNotExists is returned

(path string)

Source from the content-addressed store, hash-verified

295// repository is bare or a normal one. If the path doesn't contain a valid
296// repository ErrRepositoryNotExists is returned
297func PlainOpen(path string) (*Repository, error) {
298 return PlainOpenWithOptions(path, &PlainOpenOptions{})
299}
300
301// PlainOpenWithOptions opens a git repository from the given path with specific
302// options. See PlainOpen for more info.

Callers 15

TestPlainOpenMethod · 0.85
TestPlainOpenBareMethod · 0.85
TestPlainOpenNotBareMethod · 0.85
testPlainOpenGitFileMethod · 0.85
cloneMethod · 0.85
NewRepositoryMethod · 0.85
TestSubmoduleMethod · 0.85

Calls 1

PlainOpenWithOptionsFunction · 0.85

Tested by 14

TestPlainOpenMethod · 0.68
TestPlainOpenBareMethod · 0.68
TestPlainOpenNotBareMethod · 0.68
testPlainOpenGitFileMethod · 0.68
NewRepositoryMethod · 0.68
TestSubmoduleMethod · 0.68
TestSubmodulesMethod · 0.68