Rugged::Tree#path throws an exception if the path doesn't exist. But this can often be normal control flow.
> @tree.path("foo/bar")
Rugged::TreeError: the path 'foo' does not exist in the given tree
There are definitely exceptional cases - e.g. corruption of the git repository.
Solution:
- Mark this method as deprecated.
- Introduce new method
fetch(path, default=nil, &block) which works similar to Hash#fetch.