bug #14 fixed edge case (fabpot)

This PR was merged into the master branch.

Discussion
----------

fixed edge case

closes #13

Commits
-------

0e97a5c fixed edge case
This commit is contained in:
Fabien Potencier 2016-07-16 11:51:52 +02:00
commit 15fcec608b

View file

@ -266,6 +266,11 @@ func (s *state) treeByPath(tree *git.Tree, prefix string) (*git.Tree, error) {
return nil, nil
}
if treeEntry.Type != git.ObjectTree {
// tree is not a tree (a directory for a gitmodule for instance), skip
return nil, nil
}
return s.repo.LookupTree(treeEntry.Id)
}