diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-22 12:05:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-22 12:05:04 +0200 |
commit | ef234e7e7355281499a63c4b22550df023b61fbf (patch) | |
tree | f670ea4ce6e24aca4e96abf982108e2776de9ee4 /remote_test.go | |
parent | 2d10f1023e609894174b21bdf8d3738010099335 (diff) | |
parent | 2cd2d64b162cd2343b99767d796888997abc702a (diff) | |
download | go-git-ef234e7e7355281499a63c4b22550df023b61fbf.tar.gz |
Merge pull request #496 from lupine/490-no-tags-fetch-mode
Implement a NoTags mode for fetch that mimics git fetch --no-tags
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/remote_test.go b/remote_test.go index 7ffe040..e8ddb21 100644 --- a/remote_test.go +++ b/remote_test.go @@ -120,6 +120,22 @@ func (s *RemoteSuite) TestFetchWithAllTags(c *C) { }) } +func (s *RemoteSuite) TestFetchWithNoTags(c *C) { + r := newRemote(memory.NewStorage(), &config.RemoteConfig{ + URL: s.GetLocalRepositoryURL(fixtures.ByTag("tags").One()), + }) + + s.testFetch(c, r, &FetchOptions{ + Tags: NoTags, + RefSpecs: []config.RefSpec{ + config.RefSpec("+refs/heads/master:refs/remotes/origin/master"), + }, + }, []*plumbing.Reference{ + plumbing.NewReferenceFromStrings("refs/remotes/origin/master", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f"), + }) + +} + func (s *RemoteSuite) TestFetchWithDepth(c *C) { r := newRemote(memory.NewStorage(), &config.RemoteConfig{ URL: s.GetBasicLocalRepositoryURL(), |