libgit2/libgit2 — Issue #530: Peeling API
Author: carlosmn
Created: 2012-01-11 15:22:34+00:00
State: open
Labels: feature

We should have a peeling API so that if I write a tool, I don't have to manually try to figure out how to get that commit my user gave me to a tree. I'm thinking something in the direction of:

```
int git_peel_to(git object **out, git_object *in, git_otype type);
int git_reference_peel(git_object **out, git_reference *ref, git_otype type);
```

where `type` is the object type I want.