aboutsummaryrefslogtreecommitdiffstats
path: root/remote_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-01-12 14:48:31 +0100
committerGitHub <noreply@github.com>2017-01-12 14:48:31 +0100
commite69dab7fd7800c0c34c4caf2157f5d9c6638d855 (patch)
tree8b26493aeb1d85cdaddd9a39c4ca259e51b47186 /remote_test.go
parentf9c7c8c2158140d75d4d5a2fa925fc35ad77be9b (diff)
downloadgo-git-e69dab7fd7800c0c34c4caf2157f5d9c6638d855.tar.gz
remote: fix empty-git-upload-pack error in fetch, when the reference points to a non-commit object (#209)
Diffstat (limited to 'remote_test.go')
-rw-r--r--remote_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/remote_test.go b/remote_test.go
index 02ff690..7f40979 100644
--- a/remote_test.go
+++ b/remote_test.go
@@ -171,6 +171,17 @@ func (s *RemoteSuite) TestFetchWithPackfileWriter(c *C) {
func (s *RemoteSuite) TestFetchNoErrAlreadyUpToDate(c *C) {
url := s.GetBasicLocalRepositoryURL()
+ s.doTestFetchNoErrAlreadyUpToDate(c, url)
+}
+
+func (s *RemoteSuite) TestFetchNoErrAlreadyUpToDateWithNonCommitObjects(c *C) {
+ fixture := fixtures.ByTag("tags").One()
+ url := s.GetLocalRepositoryURL(fixture)
+ s.doTestFetchNoErrAlreadyUpToDate(c, url)
+}
+
+func (s *RemoteSuite) doTestFetchNoErrAlreadyUpToDate(c *C, url string) {
+
sto := memory.NewStorage()
r := newRemote(sto, nil, &config.RemoteConfig{Name: "foo", URL: url})