func New() (*LocalGit, *git.Client, error) {
	g, err := exec.LookPath("git")
	if err != nil {
		return nil, nil, err
	}
	t, err := ioutil.TempDir("", "localgit")
	if err != nil {
		return nil, nil, err
	}
	c, err := git.NewClient()
	if err != nil {
		os.RemoveAll(t)
		return nil, nil, err
	}

	getSecret := func() []byte {
		return []byte("")
	}

	c.SetCredentials("", getSecret)

	c.SetRemote(t)
	return &LocalGit{
		Dir: t,
		Git: g,
	}, c, nil
}
func New() (*LocalGit, *git.Client, error) {
	g, err := exec.LookPath("git")
	if err != nil {
		return nil, nil, err
	}
	t, err := ioutil.TempDir("", "localgit")
	if err != nil {
		return nil, nil, err
	}
	c, err := git.NewClient()
	if err != nil {
		os.RemoveAll(t)
		return nil, nil, err
	}

	getSecret := func() []byte {
		return []byte("")
	}

	c.SetCredentials("", getSecret)

	c.SetRemote(t)
	return &LocalGit{
		Dir: t,
		Git: g,
	}, c, nil
}
func New ( ) ( * LocalGit , * git . Client , error ) { g , err := exec . LookPath ( " " ) if err != nil { return nil , nil , err } t , err := ioutil . TempDir ( " " , " " ) if err != nil { return nil , nil , err } c , err := git . NewClient ( ) if err != nil { os . RemoveAll ( t ) return nil , nil , err } getSecret := func ( ) [ ] byte { return [ ] byte ( " " ) } c . SetCredentials ( " " , getSecret ) c . SetRemote ( t ) return & LocalGit { Dir : t , Git : g , } , c , nil }
// New creates a LocalGit and a git.Client pointing at it.
New creates a LocalGit and a git . Client pointing at it .