diff options
Diffstat (limited to 'src/indexer.c')
-rw-r--r-- | src/indexer.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/indexer.c b/src/indexer.c index ecbee35df..dd9990423 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -48,7 +48,7 @@ struct git_indexer { unsigned int mode; git_off_t off; git_off_t entry_start; - git_otype entry_type; + git_object_t entry_type; git_buf entry_data; git_packfile_stream stream; size_t nr_objects; @@ -213,7 +213,7 @@ static int store_delta(git_indexer *idx) return 0; } -static int hash_header(git_hash_ctx *ctx, git_off_t len, git_otype type) +static int hash_header(git_hash_ctx *ctx, git_off_t len, git_object_t type) { char buffer[64]; size_t hdrlen; @@ -249,13 +249,13 @@ static int hash_object_stream(git_indexer*idx, git_packfile_stream *stream) } /* In order to create the packfile stream, we need to skip over the delta base description */ -static int advance_delta_offset(git_indexer *idx, git_otype type) +static int advance_delta_offset(git_indexer *idx, git_object_t type) { git_mwindow *w = NULL; - assert(type == GIT_OBJ_REF_DELTA || type == GIT_OBJ_OFS_DELTA); + assert(type == GIT_OBJECT_REF_DELTA || type == GIT_OBJECT_OFS_DELTA); - if (type == GIT_OBJ_REF_DELTA) { + if (type == GIT_OBJECT_REF_DELTA) { idx->off += GIT_OID_RAWSZ; } else { git_off_t base_off = get_delta_base(idx->pack, &w, &idx->off, type, idx->entry_start); @@ -332,10 +332,10 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj) size_t keyidx; int error; - if (obj->type != GIT_OBJ_BLOB && - obj->type != GIT_OBJ_TREE && - obj->type != GIT_OBJ_COMMIT && - obj->type != GIT_OBJ_TAG) + if (obj->type != GIT_OBJECT_BLOB && + obj->type != GIT_OBJECT_TREE && + obj->type != GIT_OBJECT_COMMIT && + obj->type != GIT_OBJECT_TAG) return 0; if ((error = git_object__from_raw(&object, obj->data, obj->len, obj->type)) < 0) @@ -356,7 +356,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj) return 0; switch (obj->type) { - case GIT_OBJ_TREE: + case GIT_OBJECT_TREE: { git_tree *tree = (git_tree *) object; git_tree_entry *entry; @@ -367,7 +367,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj) break; } - case GIT_OBJ_COMMIT: + case GIT_OBJECT_COMMIT: { git_commit *commit = (git_commit *) object; git_oid *parent_oid; @@ -380,7 +380,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj) break; } - case GIT_OBJ_TAG: + case GIT_OBJECT_TAG: { git_tag *tag = (git_tag *) object; @@ -388,7 +388,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj) break; } - case GIT_OBJ_BLOB: + case GIT_OBJECT_BLOB: default: break; } @@ -661,7 +661,7 @@ static int read_stream_object(git_indexer *idx, git_transfer_progress *stats) git_packfile_stream *stream = &idx->stream; git_off_t entry_start = idx->off; size_t entry_size; - git_otype type; + git_object_t type; git_mwindow *w = NULL; int error; @@ -682,7 +682,7 @@ static int read_stream_object(git_indexer *idx, git_transfer_progress *stats) git_hash_init(&idx->hash_ctx); git_buf_clear(&idx->entry_data); - if (type == GIT_OBJ_REF_DELTA || type == GIT_OBJ_OFS_DELTA) { + if (type == GIT_OBJECT_REF_DELTA || type == GIT_OBJECT_OFS_DELTA) { error = advance_delta_offset(idx, type); if (error == GIT_EBUFS) { idx->off = entry_start; @@ -935,7 +935,7 @@ static int fix_thin_pack(git_indexer *idx, git_transfer_progress *stats) unsigned int i; struct delta_info *delta; size_t size; - git_otype type; + git_object_t type; git_mwindow *w = NULL; git_off_t curpos = 0; unsigned char *base_info; @@ -959,7 +959,7 @@ static int fix_thin_pack(git_indexer *idx, git_transfer_progress *stats) if (error < 0) return error; - if (type == GIT_OBJ_REF_DELTA) { + if (type == GIT_OBJECT_REF_DELTA) { found_ref_delta = 1; break; } |