diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-10-15 11:32:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 11:32:41 +0200 |
commit | 03810084a0cdb9eb432651979b0784a9fd92736a (patch) | |
tree | f42fdd38eeb25fbbf53fc19b4fd04cd6f7f25124 /repository_test.go | |
parent | 0bfe038a16551ede1d22bfb54f52c31b646a9e1a (diff) | |
parent | 529f8438980a29999ca44f3a3e74eb317d0cf3c5 (diff) | |
download | go-git-03810084a0cdb9eb432651979b0784a9fd92736a.tar.gz |
Merge pull request #828 from fooker/patch-1
Use remote name in fetch while clone
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 bf02933..6d34d42 100644 --- a/repository_test.go +++ b/repository_test.go @@ -568,6 +568,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() |