Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created December 30, 2020 12:19
Show Gist options
  • Save percybolmer/c52d77c11e1c12bf3f651ea994f10a01 to your computer and use it in GitHub Desktop.
Save percybolmer/c52d77c11e1c12bf3f651ea994f10a01 to your computer and use it in GitHub Desktop.
PlainOpen of a git
// 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
func PlainOpen(path string) (*Repository, error) {
return PlainOpenWithOptions(path, &PlainOpenOptions{})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment