Esempio n. 1
0
File: repo.go Progetto: sombr/ccat
func init() {
	// Overwrite the git opener to return repositories that use the
	// faster libgit2 implementation.
	vcs.RegisterOpener("git", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
}
Esempio n. 2
0
File: repo.go Progetto: sombr/ccat
func init() {
	// Overwrite the hg opener to return repositories that use the
	// faster native-Go hg implementation.
	vcs.RegisterOpener("hg", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
}
Esempio n. 3
0
File: repo.go Progetto: sombr/ccat
func init() {
	vcs.RegisterOpener("git", func(dir string) (vcs.Repository, error) {
		return Open(dir)
	})
	vcs.RegisterCloner("git", func(url, dir string, opt vcs.CloneOpt) (vcs.Repository, error) {
		return Clone(url, dir, opt)
	})
}