diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2015-05-19 11:23:59 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-28 09:47:31 -0400 |
| commit | 9f545b9d71c7bd316be80e5fe8b47135e9deb97e (patch) | |
| tree | d2cf3279b4fd716fcea963a2a0118dd522a52270 /src/iterator.c | |
| parent | 2f1080ea04ad1235efcd4b213dbe3a1b847644f7 (diff) | |
| download | libgit2-9f545b9d71c7bd316be80e5fe8b47135e9deb97e.tar.gz | |
introduce `git_index_entry_is_conflict`
It's not always obvious the mapping between stage level and
conflict-ness. More importantly, this can lead otherwise sane
people to write constructs like `if (!git_index_entry_stage(entry))`,
which (while technically correct) is unreadable.
Provide a nice method to help avoid such messy thinking.
Diffstat (limited to 'src/iterator.c')
| -rw-r--r-- | src/iterator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iterator.c b/src/iterator.c index 1e946fadc..93303a87d 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -674,7 +674,7 @@ static const git_index_entry *index_iterator__advance_over_conflicts(index_itera const git_index_entry *ie = index_iterator__index_entry(ii); if (!iterator__include_conflicts(ii)) { - while (ie && git_index_entry_stage(ie) != 0) { + while (ie && git_index_entry_is_conflict(ie)) { ii->current++; ie = index_iterator__index_entry(ii); } |
