MCPcopy
hub / github.com/go-git/go-git / PlainInit

Function PlainInit

repository.go:252–256  ·  view source on GitHub ↗

PlainInit create an empty git repository at the given path. isBare defines if the repository will have worktree (non-bare) or not (bare), if the path is not empty ErrRepositoryAlreadyExists is returned.

(path string, isBare bool)

Source from the content-addressed store, hash-verified

250// if the repository will have worktree (non-bare) or not (bare), if the path
251// is not empty ErrRepositoryAlreadyExists is returned.
252func PlainInit(path string, isBare bool) (*Repository, error) {
253 return PlainInitWithOptions(path, &PlainInitOptions{
254 Bare: isBare,
255 })
256}
257
258func PlainInitWithOptions(path string, opts *PlainInitOptions) (*Repository, error) {
259 if opts == nil {

Calls 1

PlainInitWithOptionsFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…