vendor/libgit2/src/annotated_commit.c in rugged-0.27.10 vs vendor/libgit2/src/annotated_commit.c in rugged-0.27.10.1

- old
+ new

@@ -29,11 +29,11 @@ assert(out && commit); *out = NULL; annotated_commit = git__calloc(1, sizeof(git_annotated_commit)); - GIT_ERROR_CHECK_ALLOC(annotated_commit); + GITERR_CHECK_ALLOC(annotated_commit); annotated_commit->type = GIT_ANNOTATED_COMMIT_REAL; if ((error = git_commit_dup(&annotated_commit->commit, commit)) < 0) goto done; @@ -43,11 +43,11 @@ if (!description) description = annotated_commit->id_str; annotated_commit->description = git__strdup(description); - GIT_ERROR_CHECK_ALLOC(annotated_commit->description); + GITERR_CHECK_ALLOC(annotated_commit->description); done: if (!error) *out = annotated_commit; @@ -103,11 +103,11 @@ assert(out && repo && revspec); if ((error = git_revparse_single(&obj, repo, revspec)) < 0) return error; - if ((error = git_object_peel(&commit, obj, GIT_OBJECT_COMMIT))) { + if ((error = git_object_peel(&commit, obj, GIT_OBJ_COMMIT))) { git_object_free(obj); return error; } error = annotated_commit_init(out, (git_commit *)commit, revspec); @@ -128,21 +128,21 @@ assert(out && repo && ref); *out = NULL; - if ((error = git_reference_peel(&peeled, ref, GIT_OBJECT_COMMIT)) < 0) + if ((error = git_reference_peel(&peeled, ref, GIT_OBJ_COMMIT)) < 0) return error; - + error = annotated_commit_init_from_id(out, repo, git_object_id(peeled), git_reference_name(ref)); if (!error) { (*out)->ref_name = git__strdup(git_reference_name(ref)); - GIT_ERROR_CHECK_ALLOC((*out)->ref_name); + GITERR_CHECK_ALLOC((*out)->ref_name); } git_object_free(peeled); return error; } @@ -178,30 +178,23 @@ if (annotated_commit_init_from_id(out, repo, id, branch_name) < 0) return -1; (*out)->ref_name = git__strdup(branch_name); - GIT_ERROR_CHECK_ALLOC((*out)->ref_name); + GITERR_CHECK_ALLOC((*out)->ref_name); (*out)->remote_url = git__strdup(remote_url); - GIT_ERROR_CHECK_ALLOC((*out)->remote_url); + GITERR_CHECK_ALLOC((*out)->remote_url); return 0; } const git_oid *git_annotated_commit_id( const git_annotated_commit *annotated_commit) { assert(annotated_commit); return git_commit_id(annotated_commit->commit); -} - -const char *git_annotated_commit_ref( - const git_annotated_commit *annotated_commit) -{ - assert(annotated_commit); - return annotated_commit->ref_name; } void git_annotated_commit_free(git_annotated_commit *annotated_commit) { if (annotated_commit == NULL)