diff options
Diffstat (limited to 'builtin/merge-tree.c')
-rw-r--r-- | builtin/merge-tree.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index 61cbde4094..f9ab48597e 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -25,7 +25,7 @@ static void add_merge_entry(struct merge_list *entry) merge_result_end = &entry->next; } -static void merge_trees_recursive(struct tree_desc t[3], const char *base, int df_conflict); +static void merge_trees(struct tree_desc t[3], const char *base); static const char *explanation(struct merge_list *entry) { @@ -195,8 +195,8 @@ static void resolve(const struct traverse_info *info, struct name_entry *ours, s add_merge_entry(final); } -static void unresolved_directory(const struct traverse_info *info, struct name_entry n[3], - int df_conflict) +static void unresolved_directory(const struct traverse_info *info, + struct name_entry n[3]) { char *newbase; struct name_entry *p; @@ -218,7 +218,7 @@ static void unresolved_directory(const struct traverse_info *info, struct name_e buf2 = fill_tree_descriptor(t+2, ENTRY_SHA1(n + 2)); #undef ENTRY_SHA1 - merge_trees_recursive(t, newbase, df_conflict); + merge_trees(t, newbase); free(buf0); free(buf1); @@ -259,7 +259,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3]) dirmask |= (1 << i); } - unresolved_directory(info, n, dirmask && (dirmask != mask)); + unresolved_directory(info, n); if (dirmask == mask) return; @@ -335,21 +335,15 @@ static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, s return mask; } -static void merge_trees_recursive(struct tree_desc t[3], const char *base, int df_conflict) +static void merge_trees(struct tree_desc t[3], const char *base) { struct traverse_info info; setup_traverse_info(&info, base); - info.data = &df_conflict; info.fn = threeway_callback; traverse_trees(3, t, &info); } -static void merge_trees(struct tree_desc t[3], const char *base) -{ - merge_trees_recursive(t, base, 0); -} - static void *get_tree_descriptor(struct tree_desc *desc, const char *rev) { unsigned char sha1[20]; |