// NewGitPkg now will panic, make sure to be invoked after IsTracking
NewGitPkg now will panic, make sure to be invoked after IsTracking
// NewGitPkg now will panic make sure to be invoked after IsTracking
func NewGitPkg(name, remote, branch, pakName string) PkgProxy {
	gitPkg := GitPkg{}
	gitPkg.Name = name
	gitPkg.Remote = remote
	gitPkg.Branch = branch
	gitPkg.RemoteBranch = fmt.Sprintf("refs/remotes/%s/%s", remote, branch)
	gitPkg.PakName = pakName
	gitPkg.PakbranchRef = "refs/heads/" + gitPkg.PakName
	gitPkg.Path = fmt.Sprintf("%s/src/%s", Gopath, name)
	root, err := GetPkgRoot(gitPkg.Name)
	if err != nil {
		panic(err) 
	}
	gitPkg.PkgRoot = fmt.Sprintf("%s/src/%s", Gopath, root)
	gitPkg.WorkTree = fmt.Sprintf("--work-tree=%s", gitPkg.PkgRoot)
	gitPkg.GitDir = fmt.Sprintf("--git-dir=%s/.git", gitPkg.PkgRoot)
	return &gitPkg
}
func NewGitPkg ( name , remote , branch , pakName string ) PkgProxy { gitPkg := GitPkg { } gitPkg . Name = name gitPkg . Remote = remote gitPkg . Branch = branch gitPkg . RemoteBranch = fmt . Sprintf ( " " , remote , branch ) gitPkg . PakName = pakName gitPkg . PakbranchRef = " " + gitPkg . PakName gitPkg . Path = fmt . Sprintf ( " " , Gopath , name ) root , err := GetPkgRoot ( gitPkg . Name ) if err != nil { panic ( err ) } gitPkg . PkgRoot = fmt . Sprintf ( " " , Gopath , root ) gitPkg . WorkTree = fmt . Sprintf ( " " , gitPkg . PkgRoot ) gitPkg . GitDir = fmt . Sprintf ( " " , gitPkg . PkgRoot ) return & gitPkg }
NewGitPkg now will panic, make sure to be invoked after IsTracking
NewGitPkg now will panic make sure to be invoked after IsTracking
// gitPkg.PakbranchRef = "refs/heads/" + Pakbranch // gitPkg.PaktagRef = "refs/tags/" + Paktag // TODO: would be nice if don't panic