const void *git_blob_rawcontent(git_blob *blob) { assert(blob); if (blob->content.data != NULL) return blob->content.data; if (blob->object.in_memory) return NULL; if (!blob->object.source.open && git_object__source_open((git_object *)blob) < GIT_SUCCESS) return NULL; return blob->object.source.raw.data; }
int git_commit__parse_full(git_commit *commit) { int error; if (commit->full_parse) return GIT_SUCCESS; if ((error = git_object__source_open((git_object *)commit)) < GIT_SUCCESS) return error; error = commit_parse_buffer(commit, commit->object.source.raw.data, commit->object.source.raw.len, COMMIT_FULL_PARSE); git_object__source_close((git_object *)commit); commit->full_parse = 1; return error; }