Exemple #1
0
func init() {
	// Overwrite the git cloner to use the faster libgit2
	// implementation.
	vcs.RegisterCloner("git", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return Clone(url, dir, opt)
	})
}
Exemple #2
0
func init() {
	vcs.RegisterOpener("hg", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
	vcs.RegisterCloner("hg", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return CloneHgRepository(url, dir, opt)
	})
}