I believe the API should take git_commit pointers and rely on the user of the API to call rev-parse in order to use it. This eliminates an error condition (i.e. the commitish string cannot be resolved to a commit) and keeps this focused on the unique function that it adds to libgit2. If you want a NULL value for newest_commit to default to the repository HEAD and a NULL value for the oldest_commit to default to the first ancestor with a NULL parent, that can still work, I think.