carlosmn/libgit2 — comment on commit 6f38bf6e78f21ace75998ea6ae5903ad541d86a6
File: src/tree.c line 760
By peff:

On Thu, Oct 27, 2011 at 11:11:54AM -0700, Carlos Martín Nieto wrote:

> > And it's probably a good thing to be able to do a non-recursive
> > tree diff in some cases, because the caller might be doing something
> > tricky and want the efficiency.
>
> We let the user take care of everything (for now, at least) because we
> figured it was a more elegant way, as the user probably has their own
> way of storing this information and formatting it just so the user can
> do the same thing again is quite wasteful.
>
> If the user wants to know what tree they're dealing with, that's what
> the data pointer to the callback is for. Once we implement more features
> around tree diffs, we could export the data structures we use and
> provide API calls that do much more for the user.

OK. I think it's reasonable to be non-recursive for now, and let
recursive API come later.

-Peff