diff options
author | Yusuke Hatanaka <arbalestimp@gmail.com> | 2017-03-28 12:47:24 +0900 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-03-28 05:47:24 +0200 |
commit | e190c37cf51a2a320cabd81b25057859ed689a3b (patch) | |
tree | 9620c6636b29c008194c75230d1b119e38db4dad /plumbing/reference_test.go | |
parent | 62ad629b9a4213fdb8d33bcc7e0bea66d043fc41 (diff) | |
download | go-git-e190c37cf51a2a320cabd81b25057859ed689a3b.tar.gz |
plumbing: Reference, support slash separated branch (#302)
Diffstat (limited to 'plumbing/reference_test.go')
-rw-r--r-- | plumbing/reference_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plumbing/reference_test.go b/plumbing/reference_test.go index 849f159..6a695f4 100644 --- a/plumbing/reference_test.go +++ b/plumbing/reference_test.go @@ -18,6 +18,11 @@ func (s *ReferenceSuite) TestReferenceNameShort(c *C) { c.Assert(ExampleReferenceName.Short(), Equals, "v4") } +func (s *ReferenceSuite) TestReferenceNameWithSlash(c *C) { + r := ReferenceName("refs/remotes/origin/feature/AllowSlashes") + c.Assert(r.Short(), Equals, "origin/feature/AllowSlashes") +} + func (s *ReferenceSuite) TestNewReferenceFromStrings(c *C) { r := NewReferenceFromStrings("refs/heads/v4", "6ecf0ef2c2dffb796033e5a02219af86ec6584e5") c.Assert(r.Type(), Equals, HashReference) |