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