diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-12-04 20:00:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-04 20:00:41 -0500 |
| commit | 12b53eb0318b0529514ad7e318de70b8325d43f2 (patch) | |
| tree | dcec3efee630f9c38e15433302e5c6faec65e517 /src/commit_list.c | |
| parent | 6fdb1b2f55da9593576b096ee2eecce61995fb51 (diff) | |
| parent | 9f03ebd14b6beb00a9bed52c0568a13f8d5ebb08 (diff) | |
| download | libgit2-12b53eb0318b0529514ad7e318de70b8325d43f2.tar.gz | |
Merge pull request #6128 from libgit2/ethomson/object_validation
Introduce `git_object_rawcontent_is_valid`
Diffstat (limited to 'src/commit_list.c')
| -rw-r--r-- | src/commit_list.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commit_list.c b/src/commit_list.c index 692b1495f..4585508bc 100644 --- a/src/commit_list.c +++ b/src/commit_list.c @@ -124,16 +124,15 @@ static int commit_quick_parse( { git_oid *parent_oid; git_commit *commit; - int error; size_t i; commit = git__calloc(1, sizeof(*commit)); GIT_ERROR_CHECK_ALLOC(commit); commit->object.repo = walk->repo; - if ((error = git_commit__parse_ext(commit, obj, GIT_COMMIT_PARSE_QUICK)) < 0) { + if (git_commit__parse_ext(commit, obj, GIT_COMMIT_PARSE_QUICK) < 0) { git__free(commit); - return error; + return -1; } if (!git__is_uint16(git_array_size(commit->parent_ids))) { |
