mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
merge-tree: remove unused df_conflict arguments
merge_trees_recursive() stores a pointer to its parameter df_conflict in its struct traverse_info, but it is never actually used. Stop doing that, remove the parameter and inline the function into merge_trees(), as the latter is now only passing on its parameters. Remove the parameter df_conflict from unresolved_directory() as well, now that there is no way to pass it to merge_trees_recursive() through that function anymore. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
96db324a73
commit
57065289a9
|
@ -25,7 +25,7 @@ static void add_merge_entry(struct merge_list *entry)
|
||||||
merge_result_end = &entry->next;
|
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)
|
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);
|
add_merge_entry(final);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unresolved_directory(const struct traverse_info *info, struct name_entry n[3],
|
static void unresolved_directory(const struct traverse_info *info,
|
||||||
int df_conflict)
|
struct name_entry n[3])
|
||||||
{
|
{
|
||||||
char *newbase;
|
char *newbase;
|
||||||
struct name_entry *p;
|
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));
|
buf2 = fill_tree_descriptor(t+2, ENTRY_SHA1(n + 2));
|
||||||
#undef ENTRY_SHA1
|
#undef ENTRY_SHA1
|
||||||
|
|
||||||
merge_trees_recursive(t, newbase, df_conflict);
|
merge_trees(t, newbase);
|
||||||
|
|
||||||
free(buf0);
|
free(buf0);
|
||||||
free(buf1);
|
free(buf1);
|
||||||
|
@ -259,7 +259,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
|
||||||
dirmask |= (1 << i);
|
dirmask |= (1 << i);
|
||||||
}
|
}
|
||||||
|
|
||||||
unresolved_directory(info, n, dirmask && (dirmask != mask));
|
unresolved_directory(info, n);
|
||||||
|
|
||||||
if (dirmask == mask)
|
if (dirmask == mask)
|
||||||
return;
|
return;
|
||||||
|
@ -335,21 +335,15 @@ static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, s
|
||||||
return mask;
|
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;
|
struct traverse_info info;
|
||||||
|
|
||||||
setup_traverse_info(&info, base);
|
setup_traverse_info(&info, base);
|
||||||
info.data = &df_conflict;
|
|
||||||
info.fn = threeway_callback;
|
info.fn = threeway_callback;
|
||||||
traverse_trees(3, t, &info);
|
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)
|
static void *get_tree_descriptor(struct tree_desc *desc, const char *rev)
|
||||||
{
|
{
|
||||||
unsigned char sha1[20];
|
unsigned char sha1[20];
|
||||||
|
|
Loading…
Reference in a new issue