diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-28 14:26:57 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-12-01 11:54:57 +0000 |
commit | 168fe39bea3368972a8b1a33d5908e73bc790c18 (patch) | |
tree | c6d07340e2d8d2d66091c44c7763f3e1823acca2 /src/refs.c | |
parent | 18e71e6d597abe6c7feb666429c921bd19dc0ba8 (diff) | |
download | libgit2-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/refs.c')
-rw-r--r-- | src/refs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/refs.c b/src/refs.c index 933921099..ee2718d1b 100644 --- a/src/refs.c +++ b/src/refs.c @@ -436,7 +436,7 @@ static int reference__create( if (oid != NULL) { assert(symbolic == NULL); - if (!git_object__is_valid(repo, oid, GIT_OBJ_ANY)) { + if (!git_object__is_valid(repo, oid, GIT_OBJECT_ANY)) { giterr_set(GITERR_REFERENCE, "target OID for the reference doesn't exist on the repository"); return -1; @@ -1348,7 +1348,7 @@ static int peel_error(int error, git_reference *ref, const char* msg) int git_reference_peel( git_object **peeled, git_reference *ref, - git_otype target_type) + git_object_t target_type) { git_reference *resolved = NULL; git_object *target = NULL; @@ -1369,12 +1369,12 @@ int git_reference_peel( * to a commit. So we only want to use the peeled value * if it is not zero and the target is not a tag. */ - if (target_type != GIT_OBJ_TAG && !git_oid_iszero(&resolved->peel)) { + if (target_type != GIT_OBJECT_TAG && !git_oid_iszero(&resolved->peel)) { error = git_object_lookup(&target, - git_reference_owner(ref), &resolved->peel, GIT_OBJ_ANY); + git_reference_owner(ref), &resolved->peel, GIT_OBJECT_ANY); } else { error = git_object_lookup(&target, - git_reference_owner(ref), &resolved->target.oid, GIT_OBJ_ANY); + git_reference_owner(ref), &resolved->target.oid, GIT_OBJECT_ANY); } if (error < 0) { @@ -1382,7 +1382,7 @@ int git_reference_peel( goto cleanup; } - if (target_type == GIT_OBJ_ANY && git_object_type(target) != GIT_OBJ_TAG) + if (target_type == GIT_OBJECT_ANY && git_object_type(target) != GIT_OBJECT_TAG) error = git_object_dup(peeled, target); else error = git_object_peel(peeled, target, target_type); |