...and it returns a pointer to the stack buffer so you can pass it directly in the varargs in `giterr_set`.

```
char buf[GIT_OID_HEXSZ + 1];
giterr_set(GITERR_INVALID, "Commit %s is a merge commit", git_commit_tostr(buf, 41, git_commit_id(commit)));
```