One option for looking up the blob that I think is somewhat simpler than the above sequence would be to write:

```c
char spec[MAX_PATH] = { 0 };

if (git_oid_iszero(&opts.newest_commit))
    strcpy(spec, "HEAD");
else
    git_oid_tostr(spec, sizeof(spec), &opts.newest_commit);
strcat(spec, ":");
strcat(spec, path);

check(git_revparse_single((git_object **)&blob, repo, spec), "Blob lookup error");

rawdata = git_blob_rawcontent(blob);
```

I don't know if that's actually easier or not, but conceptually, I feel like doing a single lookup using `"<oid>:<path>"` form is easier to think about and involves fewer intermediate objects that we have to remember to free at the end.