I wonder if this sequence of steps is so common that we should just have a new API like `int git_object_lookup_by_path(git_object **obj, const git_object *treeish, const char *path, git_otype type)` which given a treeish root object (tag, commit, or tree) and a path can look up the object at the given path (which could be a BLOB, TREE, or COMMIT). It seems like that would be useful.