summaryrefslogtreecommitdiff
path: root/src/iterator.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-01-18 14:11:01 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-18 14:14:38 +0000
commitb59c71d8a48c2d70e05f82c3a87b49e0b99db810 (patch)
tree8a457d278f99706a0a49d2addcfcbbd6a4977f9b /src/iterator.c
parentdf3063eafeff67b855b98068f8fdb3ecfd1daf65 (diff)
downloadlibgit2-b59c71d8a48c2d70e05f82c3a87b49e0b99db810.tar.gz
iterator: update enum type name for consistency
libgit2 does not use `type_t` suffixes as it's redundant; thus, rename `git_iterator_type_t` to `git_iterator_t` for consistency.
Diffstat (limited to 'src/iterator.c')
-rw-r--r--src/iterator.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/iterator.c b/src/iterator.c
index 28ffddf6c..e26e2c0c7 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -405,7 +405,7 @@ int git_iterator_for_nothing(
iter = git__calloc(1, sizeof(empty_iterator));
GIT_ERROR_CHECK_ALLOC(iter);
- iter->base.type = GIT_ITERATOR_TYPE_EMPTY;
+ iter->base.type = GIT_ITERATOR_EMPTY;
iter->base.cb = &callbacks;
iter->base.flags = options->flags;
@@ -950,7 +950,7 @@ int git_iterator_for_tree(
iter = git__calloc(1, sizeof(tree_iterator));
GIT_ERROR_CHECK_ALLOC(iter);
- iter->base.type = GIT_ITERATOR_TYPE_TREE;
+ iter->base.type = GIT_ITERATOR_TREE;
iter->base.cb = &callbacks;
if ((error = iterator_init_common(&iter->base,
@@ -974,7 +974,7 @@ int git_iterator_current_tree_entry(
tree_iterator_frame *frame;
tree_iterator_entry *entry;
- assert(i->type == GIT_ITERATOR_TYPE_TREE);
+ assert(i->type == GIT_ITERATOR_TREE);
iter = (tree_iterator *)i;
@@ -991,7 +991,7 @@ int git_iterator_current_parent_tree(
tree_iterator *iter;
tree_iterator_frame *frame;
- assert(i->type == GIT_ITERATOR_TYPE_TREE);
+ assert(i->type == GIT_ITERATOR_TREE);
iter = (tree_iterator *)i;
@@ -1271,7 +1271,7 @@ static int filesystem_iterator_entry_hash(
return 0;
}
- if (iter->base.type == GIT_ITERATOR_TYPE_WORKDIR)
+ if (iter->base.type == GIT_ITERATOR_WORKDIR)
return git_repository_hashfile(&entry->id,
iter->base.repo, entry->path, GIT_OBJECT_BLOB, NULL);
@@ -1668,8 +1668,8 @@ int git_iterator_current_workdir_path(git_buf **out, git_iterator *i)
filesystem_iterator *iter = GIT_CONTAINER_OF(i, filesystem_iterator, base);
const git_index_entry *entry;
- if (i->type != GIT_ITERATOR_TYPE_FS &&
- i->type != GIT_ITERATOR_TYPE_WORKDIR) {
+ if (i->type != GIT_ITERATOR_FS &&
+ i->type != GIT_ITERATOR_WORKDIR) {
*out = NULL;
return 0;
}
@@ -1727,7 +1727,7 @@ bool git_iterator_current_is_ignored(git_iterator *i)
{
filesystem_iterator *iter = NULL;
- if (i->type != GIT_ITERATOR_TYPE_WORKDIR)
+ if (i->type != GIT_ITERATOR_WORKDIR)
return false;
iter = GIT_CONTAINER_OF(i, filesystem_iterator, base);
@@ -1740,7 +1740,7 @@ bool git_iterator_current_tree_is_ignored(git_iterator *i)
filesystem_iterator *iter = GIT_CONTAINER_OF(i, filesystem_iterator, base);
filesystem_iterator_frame *frame;
- if (i->type != GIT_ITERATOR_TYPE_WORKDIR)
+ if (i->type != GIT_ITERATOR_WORKDIR)
return false;
frame = filesystem_iterator_current_frame(iter);
@@ -1894,7 +1894,7 @@ static int iterator_for_filesystem(
const char *root,
git_index *index,
git_tree *tree,
- git_iterator_type_t type,
+ git_iterator_t type,
git_iterator_options *options)
{
filesystem_iterator *iter;
@@ -1971,7 +1971,7 @@ int git_iterator_for_filesystem(
git_iterator_options *options)
{
return iterator_for_filesystem(out,
- NULL, root, NULL, NULL, GIT_ITERATOR_TYPE_FS, options);
+ NULL, root, NULL, NULL, GIT_ITERATOR_FS, options);
}
int git_iterator_for_workdir_ext(
@@ -1999,7 +1999,7 @@ int git_iterator_for_workdir_ext(
GIT_ITERATOR_IGNORE_DOT_GIT;
return iterator_for_filesystem(out,
- repo, repo_workdir, index, tree, GIT_ITERATOR_TYPE_WORKDIR, &options);
+ repo, repo_workdir, index, tree, GIT_ITERATOR_WORKDIR, &options);
}
@@ -2248,7 +2248,7 @@ int git_iterator_for_index(
iter = git__calloc(1, sizeof(index_iterator));
GIT_ERROR_CHECK_ALLOC(iter);
- iter->base.type = GIT_ITERATOR_TYPE_INDEX;
+ iter->base.type = GIT_ITERATOR_INDEX;
iter->base.cb = &callbacks;
if ((error = iterator_init_common(&iter->base, repo, index, options)) < 0 ||