diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-10-15 11:28:12 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2018-10-15 11:28:12 +0200 |
commit | 529f8438980a29999ca44f3a3e74eb317d0cf3c5 (patch) | |
tree | cf10e219b04894676136916edd43d3a446add3be /repository_test.go | |
parent | 2eb97fb44707bc122c53bf2ad8eaf24ad8d679f4 (diff) | |
download | go-git-529f8438980a29999ca44f3a3e74eb317d0cf3c5.tar.gz |
use remote name in fetch while clone, test
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Diffstat (limited to 'repository_test.go')
-rw-r--r-- | repository_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/repository_test.go b/repository_test.go index b78fbb7..9303bef 100644 --- a/repository_test.go +++ b/repository_test.go @@ -566,6 +566,19 @@ func (s *RepositorySuite) TestPlainClone(c *C) { c.Assert(cfg.Branches["master"].Name, Equals, "master") } +func (s *RepositorySuite) TestPlainCloneWithRemoteName(c *C) { + r, err := PlainClone(c.MkDir(), false, &CloneOptions{ + URL: s.GetBasicLocalRepositoryURL(), + RemoteName: "test", + }) + + c.Assert(err, IsNil) + + remote, err := r.Remote("test") + c.Assert(err, IsNil) + c.Assert(remote, NotNil) +} + func (s *RepositorySuite) TestPlainCloneContext(c *C) { ctx, cancel := context.WithCancel(context.Background()) cancel() |