summaryrefslogtreecommitdiff
path: root/tests/index
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-05-19 11:23:59 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-05-28 09:47:31 -0400
commit9f545b9d71c7bd316be80e5fe8b47135e9deb97e (patch)
treed2cf3279b4fd716fcea963a2a0118dd522a52270 /tests/index
parent2f1080ea04ad1235efcd4b213dbe3a1b847644f7 (diff)
downloadlibgit2-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 'tests/index')
-rw-r--r--tests/index/conflicts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/index/conflicts.c b/tests/index/conflicts.c
index 65f8ed599..b7a2456eb 100644
--- a/tests/index/conflicts.c
+++ b/tests/index/conflicts.c
@@ -272,7 +272,7 @@ void test_index_conflicts__moved_to_reuc_on_add(void)
cl_assert(entry = git_index_get_byindex(repo_index, i));
if (strcmp(entry->path, "conflicts-one.txt") == 0)
- cl_assert(git_index_entry_stage(entry) == 0);
+ cl_assert(!git_index_entry_is_conflict(entry));
}
}
@@ -312,7 +312,7 @@ void test_index_conflicts__remove_all_conflicts(void)
for (i = 0; i < git_index_entrycount(repo_index); i++) {
cl_assert(entry = git_index_get_byindex(repo_index, i));
- cl_assert(git_index_entry_stage(entry) == 0);
+ cl_assert(!git_index_entry_is_conflict(entry));
}
}