summaryrefslogtreecommitdiff
path: root/src/push.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-28 14:26:57 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-12-01 11:54:57 +0000
commit168fe39bea3368972a8b1a33d5908e73bc790c18 (patch)
treec6d07340e2d8d2d66091c44c7763f3e1823acca2 /src/push.c
parent18e71e6d597abe6c7feb666429c921bd19dc0ba8 (diff)
downloadlibgit2-168fe39bea3368972a8b1a33d5908e73bc790c18.tar.gz
object_type: use new enumeration namesethomson/index_fixes
Use the new object_type enumeration names within the codebase.
Diffstat (limited to 'src/push.c')
-rw-r--r--src/push.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/push.c b/src/push.c
index ea12210c7..0ba4d9830 100644
--- a/src/push.c
+++ b/src/push.c
@@ -242,10 +242,10 @@ static int enqueue_tag(git_object **out, git_push *push, git_oid *id)
git_object *obj = NULL, *target = NULL;
int error;
- if ((error = git_object_lookup(&obj, push->repo, id, GIT_OBJ_TAG)) < 0)
+ if ((error = git_object_lookup(&obj, push->repo, id, GIT_OBJECT_TAG)) < 0)
return error;
- while (git_object_type(obj) == GIT_OBJ_TAG) {
+ while (git_object_type(obj) == GIT_OBJECT_TAG) {
if ((error = git_packbuilder_insert(push->pb, git_object_id(obj), NULL)) < 0)
break;
@@ -278,7 +278,7 @@ static int queue_objects(git_push *push)
git_revwalk_sorting(rw, GIT_SORT_TIME);
git_vector_foreach(&push->specs, i, spec) {
- git_otype type;
+ git_object_t type;
size_t size;
if (git_oid_iszero(&spec->loid))
@@ -294,13 +294,13 @@ static int queue_objects(git_push *push)
if (git_odb_read_header(&size, &type, push->repo->_odb, &spec->loid) < 0)
goto on_error;
- if (type == GIT_OBJ_TAG) {
+ if (type == GIT_OBJECT_TAG) {
git_object *target;
if ((error = enqueue_tag(&target, push, &spec->loid)) < 0)
goto on_error;
- if (git_object_type(target) == GIT_OBJ_COMMIT) {
+ if (git_object_type(target) == GIT_OBJECT_COMMIT) {
if (git_revwalk_push(rw, git_object_id(target)) < 0) {
git_object_free(target);
goto on_error;
@@ -323,7 +323,7 @@ static int queue_objects(git_push *push)
continue;
if (!git_odb_exists(push->repo->_odb, &spec->roid)) {
- giterr_set(GITERR_REFERENCE,
+ giterr_set(GITERR_REFERENCE,
"cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.");
error = GIT_ENONFASTFORWARD;
goto on_error;