From f42d82364c5d159f65a48e720433ad2bc97f0b7f Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Mon, 22 Aug 2016 00:18:02 +0200 Subject: Remote.Fetch multiple RefSpec support --- config/refspec_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config/refspec_test.go') 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) +} -- cgit