aboutsummaryrefslogtreecommitdiffstats
path: root/config/refspec_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-22 00:18:02 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-22 00:18:02 +0200
commitf42d82364c5d159f65a48e720433ad2bc97f0b7f (patch)
tree82623f4163625786f4e8e41028dcd1c7abaf209f /config/refspec_test.go
parenta045606fc9c5cbf30b409384cbdad4804f01c61d (diff)
downloadgo-git-f42d82364c5d159f65a48e720433ad2bc97f0b7f.tar.gz
Remote.Fetch multiple RefSpec support
Diffstat (limited to 'config/refspec_test.go')
-rw-r--r--config/refspec_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/refspec_test.go b/config/refspec_test.go
index b0bb8f5..632f5a4 100644
--- a/config/refspec_test.go
+++ b/config/refspec_test.go
@@ -67,3 +67,13 @@ func (s *RefSpecSuite) TestRefSpecDstBlob(c *C) {
"refs/remotes/origin/foo",
)
}
+func (s *RefSpecSuite) TestMatchAny(c *C) {
+ specs := []RefSpec{
+ "refs/heads/bar:refs/remotes/origin/foo",
+ "refs/heads/foo:refs/remotes/origin/bar",
+ }
+
+ c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/foo")), Equals, true)
+ c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/bar")), Equals, true)
+ c.Assert(MatchAny(specs, core.ReferenceName("refs/heads/master")), Equals, false)
+}