diff options
Diffstat (limited to 'plumbing/revlist/revlist_test.go')
-rw-r--r-- | plumbing/revlist/revlist_test.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plumbing/revlist/revlist_test.go b/plumbing/revlist/revlist_test.go index 0baf27e..dd1e8c1 100644 --- a/plumbing/revlist/revlist_test.go +++ b/plumbing/revlist/revlist_test.go @@ -3,12 +3,12 @@ package revlist import ( "testing" - "github.com/src-d/go-git-fixtures" "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/object" "gopkg.in/src-d/go-git.v4/plumbing/storer" "gopkg.in/src-d/go-git.v4/storage/filesystem" + "github.com/src-d/go-git-fixtures" . "gopkg.in/check.v1" ) @@ -62,6 +62,24 @@ func (s *RevListSuite) commit(c *C, h plumbing.Hash) *object.Commit { return commit } +func (s *RevListSuite) TestRevListObjects_Submodules(c *C) { + submodules := map[string]bool{ + "6ecf0ef2c2dffb796033e5a02219af86ec6584e5": true, + } + + sto, err := filesystem.NewStorage(fixtures.ByTag("submodule").One().DotGit()) + c.Assert(err, IsNil) + + ref, err := storer.ResolveReference(sto, plumbing.HEAD) + c.Assert(err, IsNil) + + revList, err := Objects(sto, []plumbing.Hash{ref.Hash()}, nil) + c.Assert(err, IsNil) + for _, h := range revList { + c.Assert(submodules[h.String()], Equals, false) + } +} + // --- // | |\ // | | * b8e471f Creating changelog |