diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-18 14:11:01 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-18 14:14:38 +0000 |
commit | b59c71d8a48c2d70e05f82c3a87b49e0b99db810 (patch) | |
tree | 8a457d278f99706a0a49d2addcfcbbd6a4977f9b /src/diff_generate.c | |
parent | df3063eafeff67b855b98068f8fdb3ecfd1daf65 (diff) | |
download | libgit2-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/diff_generate.c')
-rw-r--r-- | src/diff_generate.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/diff_generate.c b/src/diff_generate.c index bd0b71c81..b69ef3032 100644 --- a/src/diff_generate.c +++ b/src/diff_generate.c @@ -341,16 +341,16 @@ bool git_diff_delta__should_skip( static const char *diff_mnemonic_prefix( - git_iterator_type_t type, bool left_side) + git_iterator_t type, bool left_side) { const char *pfx = ""; switch (type) { - case GIT_ITERATOR_TYPE_EMPTY: pfx = "c"; break; - case GIT_ITERATOR_TYPE_TREE: pfx = "c"; break; - case GIT_ITERATOR_TYPE_INDEX: pfx = "i"; break; - case GIT_ITERATOR_TYPE_WORKDIR: pfx = "w"; break; - case GIT_ITERATOR_TYPE_FS: pfx = left_side ? "1" : "2"; break; + case GIT_ITERATOR_EMPTY: pfx = "c"; break; + case GIT_ITERATOR_TREE: pfx = "c"; break; + case GIT_ITERATOR_INDEX: pfx = "i"; break; + case GIT_ITERATOR_WORKDIR: pfx = "w"; break; + case GIT_ITERATOR_FS: pfx = left_side ? "1" : "2"; break; default: break; } @@ -497,17 +497,17 @@ static int diff_generated_apply_options( /* Reverse src info if diff is reversed */ if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_REVERSE)) { - git_iterator_type_t tmp_src = diff->base.old_src; + git_iterator_t tmp_src = diff->base.old_src; diff->base.old_src = diff->base.new_src; diff->base.new_src = tmp_src; } /* Unset UPDATE_INDEX unless diffing workdir and index */ if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_UPDATE_INDEX) && - (!(diff->base.old_src == GIT_ITERATOR_TYPE_WORKDIR || - diff->base.new_src == GIT_ITERATOR_TYPE_WORKDIR) || - !(diff->base.old_src == GIT_ITERATOR_TYPE_INDEX || - diff->base.new_src == GIT_ITERATOR_TYPE_INDEX))) + (!(diff->base.old_src == GIT_ITERATOR_WORKDIR || + diff->base.new_src == GIT_ITERATOR_WORKDIR) || + !(diff->base.old_src == GIT_ITERATOR_INDEX || + diff->base.new_src == GIT_ITERATOR_INDEX))) diff->base.opts.flags &= ~GIT_DIFF_UPDATE_INDEX; /* if ignore_submodules not explicitly set, check diff config */ @@ -742,7 +742,7 @@ static int maybe_modified( const git_index_entry *nitem = info->nitem; unsigned int omode = oitem->mode; unsigned int nmode = nitem->mode; - bool new_is_workdir = (info->new_iter->type == GIT_ITERATOR_TYPE_WORKDIR); + bool new_is_workdir = (info->new_iter->type == GIT_ITERATOR_WORKDIR); bool modified_uncertain = false; const char *matched_pathspec; int error = 0; @@ -1079,7 +1079,7 @@ static int handle_unmatched_new_item( /* item contained in ignored directory, so skip over it */ return iterator_advance(&info->nitem, info->new_iter); - else if (info->new_iter->type != GIT_ITERATOR_TYPE_WORKDIR) { + else if (info->new_iter->type != GIT_ITERATOR_WORKDIR) { if (delta_type != GIT_DELTA_CONFLICTED) delta_type = GIT_DELTA_ADDED; } |