Do you mean this?
    if (git_commit_lookup())
        goto error;
    if (git_commit_tree())
        goto error;
    if (ReadTreeRecursive())
        goto error;