Skip to content

Commit

Permalink
bug splitsh#14 fixed edge case (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

fixed edge case

closes splitsh#13

Commits
-------

0e97a5c fixed edge case
  • Loading branch information
fabpot committed Jul 16, 2016
2 parents 2cf28e3 + 0e97a5c commit 15fcec6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions splitter/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 15fcec6

Please sign in to comment.