mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 14:31:49 +00:00
24 lines
428 B
Go
24 lines
428 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
git "github.com/libgit2/git2go/v30"
|
|
)
|
|
|
|
func main() {
|
|
options := &git.CloneOptions{
|
|
CheckoutOpts: nil,
|
|
FetchOptions: nil,
|
|
Bare: false,
|
|
CheckoutBranch: "",
|
|
RemoteCreateCallback: nil,
|
|
}
|
|
|
|
repo, err := git.Clone("https://gitlab.com/grdl/dotfiles.git", "/tmp/dotfiles/", options)
|
|
if err != nil {
|
|
panic(err.Error())
|
|
}
|
|
fmt.Println(repo.IsBare())
|
|
}
|