Commit e1807113c43b7c5008e2d5c8c449ae56c8dceeb4

Vicent Marti 2013-05-01T15:31:23

merge: Warning noise

diff --git a/src/checkout.c b/src/checkout.c
index 96e1509..defc21d 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -16,6 +16,7 @@
 #include "git2/config.h"
 #include "git2/diff.h"
 #include "git2/submodule.h"
+#include "git2/sys/index.h"
 
 #include "refs.h"
 #include "repository.h"
diff --git a/src/index.c b/src/index.c
index a935c00..1771f29 100644
--- a/src/index.c
+++ b/src/index.c
@@ -209,6 +209,9 @@ static int conflict_name_cmp(const void *a, const void *b)
 	return strcmp(name_a->ours, name_b->ours);
 }
 
+/**
+ * TODO: enable this when resolving case insensitive conflicts
+ */
 static int conflict_name_icmp(const void *a, const void *b)
 {
 	const git_index_name_entry *name_a = a;
diff --git a/src/merge.c b/src/merge.c
index 3595eb0..320be00 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -1269,7 +1269,7 @@ int git_merge_diff_list__find_differences(
 	const git_tree *their_tree)
 {
 	git_iterator *iterators[3] = {0};
-	git_index_entry *items[3] = {0}, *best_cur_item, *cur_items[3];
+	const git_index_entry *items[3] = {0}, *best_cur_item, *cur_items[3];
 	git_vector_cmp entry_compare = git_index_entry__cmp;
 	struct merge_diff_df_data df_data = {0};
 	int cur_item_modified;
diff --git a/tests-clar/merge/merge_helpers.c b/tests-clar/merge/merge_helpers.c
index b2c70be..5c3421e 100644
--- a/tests-clar/merge/merge_helpers.c
+++ b/tests-clar/merge/merge_helpers.c
@@ -52,7 +52,7 @@ int merge_trees_from_branches(
 	return 0;
 }
 
-static void dump_index_entries(git_vector *index_entries)
+void merge__dump_index_entries(git_vector *index_entries)
 {
 	size_t i;
 	const git_index_entry *index_entry;
@@ -70,7 +70,7 @@ static void dump_index_entries(git_vector *index_entries)
 	printf("\n");
 }
 
-static void dump_names(git_index *index)
+void merge__dump_names(git_index *index)
 {
 	size_t i;
 	const git_index_name_entry *conflict_name;
@@ -83,7 +83,7 @@ static void dump_names(git_index *index)
 	printf("\n");
 }
 
-static void dump_reuc(git_index *index)
+void merge__dump_reuc(git_index *index)
 {
 	size_t i;
 	const git_index_reuc_entry *reuc;
diff --git a/tests-clar/merge/trees/treediff.c b/tests-clar/merge/trees/treediff.c
index afd8ac3..5da6f76 100644
--- a/tests-clar/merge/trees/treediff.c
+++ b/tests-clar/merge/trees/treediff.c
@@ -33,13 +33,6 @@ void test_merge_trees_treediff__cleanup(void)
 	cl_git_sandbox_cleanup();
 }
 
-struct treediff_cb_data {
-    struct merge_index_conflict_data *conflict_data;
-    size_t conflict_data_len;
-
-    size_t idx;
-};
-
 static void test_find_differences(
     const char *ancestor_oidstr,
     const char *ours_oidstr,
@@ -50,7 +43,6 @@ static void test_find_differences(
     git_merge_diff_list *merge_diff_list = git_merge_diff_list__alloc(repo);
     git_oid ancestor_oid, ours_oid, theirs_oid;
     git_tree *ancestor_tree, *ours_tree, *theirs_tree;
-    struct treediff_cb_data treediff_cb_data = {0};
 
 	git_merge_tree_opts opts = GIT_MERGE_TREE_OPTS_INIT;
 	opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
@@ -82,9 +74,6 @@ static void test_find_differences(
 	 */
 	
     cl_assert(treediff_conflict_data_len == merge_diff_list->conflicts.length);
-    
-    treediff_cb_data.conflict_data = treediff_conflict_data;
-	treediff_cb_data.conflict_data_len = treediff_conflict_data_len;
 
 	cl_assert(merge_test_merge_conflicts(&merge_diff_list->conflicts, treediff_conflict_data, treediff_conflict_data_len));