MCPcopy
hub / github.com/go-git/go-git / TestPlainClone

Method TestPlainClone

repository_test.go:895–911  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

893}
894
895func (s *RepositorySuite) TestPlainClone(c *C) {
896 dir := c.MkDir()
897
898 r, err := PlainClone(dir, false, &CloneOptions{
899 URL: s.GetBasicLocalRepositoryURL(),
900 })
901
902 c.Assert(err, IsNil)
903
904 remotes, err := r.Remotes()
905 c.Assert(err, IsNil)
906 c.Assert(remotes, HasLen, 1)
907 cfg, err := r.Config()
908 c.Assert(err, IsNil)
909 c.Assert(cfg.Branches, HasLen, 1)
910 c.Assert(cfg.Branches["master"].Name, Equals, "master")
911}
912
913func (s *RepositorySuite) TestPlainCloneBareAndShared(c *C) {
914 dir := c.MkDir()

Callers

nothing calls this directly

Calls 4

PlainCloneFunction · 0.85
RemotesMethod · 0.80
ConfigMethod · 0.65

Tested by

no test coverage detected