summaryrefslogtreecommitdiff
path: root/builtin/merge-file.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-03-21 00:35:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-21 03:36:10 (GMT)
commita4b5e91c49238146f4cb85ff5f7f3bc97e0e51de (patch)
tree3870b41f8a7cd493288400d14657db961e409fe4 /builtin/merge-file.c
parent8a161433a0b414d15093e312eb9be99587074309 (diff)
downloadgit-a4b5e91c49238146f4cb85ff5f7f3bc97e0e51de.zip
git-a4b5e91c49238146f4cb85ff5f7f3bc97e0e51de.tar.gz
git-a4b5e91c49238146f4cb85ff5f7f3bc97e0e51de.tar.bz2
xdl_merge(): move file1 and file2 labels to xmparam structure
The labels for the three participants in a potential conflict are all optional arguments for the xdiff merge routine; if they are NULL, then xdl_merge() can cope by omitting the labels from its output. Move them to the xmparam structure to allow new callers to save some keystrokes where they are not needed. This also has the virtue of making the xdiff merge interface more similar to merge_trees, which might make it easier to learn. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge-file.c')
-rw-r--r--builtin/merge-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 69cc683..65eb790 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -77,8 +77,9 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
argv[i]);
}
- ret = xdl_merge(mmfs + 1, mmfs + 0, names[0], mmfs + 2, names[2],
- &xmp, &result);
+ xmp.file1 = names[0];
+ xmp.file2 = names[2];
+ ret = xdl_merge(mmfs + 1, mmfs + 0, mmfs + 2, &xmp, &result);
for (i = 0; i < 3; i++)
free(mmfs[i].ptr);