Commit e1807113 by Vicent Marti

merge: Warning noise

parent 2ba55c1f
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "git2/config.h" #include "git2/config.h"
#include "git2/diff.h" #include "git2/diff.h"
#include "git2/submodule.h" #include "git2/submodule.h"
#include "git2/sys/index.h"
#include "refs.h" #include "refs.h"
#include "repository.h" #include "repository.h"
......
...@@ -209,6 +209,9 @@ static int conflict_name_cmp(const void *a, const void *b) ...@@ -209,6 +209,9 @@ static int conflict_name_cmp(const void *a, const void *b)
return strcmp(name_a->ours, name_b->ours); 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) static int conflict_name_icmp(const void *a, const void *b)
{ {
const git_index_name_entry *name_a = a; const git_index_name_entry *name_a = a;
......
...@@ -1269,7 +1269,7 @@ int git_merge_diff_list__find_differences( ...@@ -1269,7 +1269,7 @@ int git_merge_diff_list__find_differences(
const git_tree *their_tree) const git_tree *their_tree)
{ {
git_iterator *iterators[3] = {0}; 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; git_vector_cmp entry_compare = git_index_entry__cmp;
struct merge_diff_df_data df_data = {0}; struct merge_diff_df_data df_data = {0};
int cur_item_modified; int cur_item_modified;
......
...@@ -52,7 +52,7 @@ int merge_trees_from_branches( ...@@ -52,7 +52,7 @@ int merge_trees_from_branches(
return 0; return 0;
} }
static void dump_index_entries(git_vector *index_entries) void merge__dump_index_entries(git_vector *index_entries)
{ {
size_t i; size_t i;
const git_index_entry *index_entry; const git_index_entry *index_entry;
...@@ -70,7 +70,7 @@ static void dump_index_entries(git_vector *index_entries) ...@@ -70,7 +70,7 @@ static void dump_index_entries(git_vector *index_entries)
printf("\n"); printf("\n");
} }
static void dump_names(git_index *index) void merge__dump_names(git_index *index)
{ {
size_t i; size_t i;
const git_index_name_entry *conflict_name; const git_index_name_entry *conflict_name;
...@@ -83,7 +83,7 @@ static void dump_names(git_index *index) ...@@ -83,7 +83,7 @@ static void dump_names(git_index *index)
printf("\n"); printf("\n");
} }
static void dump_reuc(git_index *index) void merge__dump_reuc(git_index *index)
{ {
size_t i; size_t i;
const git_index_reuc_entry *reuc; const git_index_reuc_entry *reuc;
......
...@@ -33,13 +33,6 @@ void test_merge_trees_treediff__cleanup(void) ...@@ -33,13 +33,6 @@ void test_merge_trees_treediff__cleanup(void)
cl_git_sandbox_cleanup(); 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( static void test_find_differences(
const char *ancestor_oidstr, const char *ancestor_oidstr,
const char *ours_oidstr, const char *ours_oidstr,
...@@ -50,7 +43,6 @@ static void test_find_differences( ...@@ -50,7 +43,6 @@ static void test_find_differences(
git_merge_diff_list *merge_diff_list = git_merge_diff_list__alloc(repo); git_merge_diff_list *merge_diff_list = git_merge_diff_list__alloc(repo);
git_oid ancestor_oid, ours_oid, theirs_oid; git_oid ancestor_oid, ours_oid, theirs_oid;
git_tree *ancestor_tree, *ours_tree, *theirs_tree; 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; git_merge_tree_opts opts = GIT_MERGE_TREE_OPTS_INIT;
opts.flags |= GIT_MERGE_TREE_FIND_RENAMES; opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
...@@ -83,9 +75,6 @@ static void test_find_differences( ...@@ -83,9 +75,6 @@ static void test_find_differences(
cl_assert(treediff_conflict_data_len == merge_diff_list->conflicts.length); 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)); cl_assert(merge_test_merge_conflicts(&merge_diff_list->conflicts, treediff_conflict_data, treediff_conflict_data_len));
git_tree_free(ancestor_tree); git_tree_free(ancestor_tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment