summaryrefslogtreecommitdiff
path: root/builtin-merge-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-29 10:49:56 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-30 19:41:44 -0700
commitb541248467fa47979a34e3f1c5bbe3308fbdc4d1 (patch)
treeaf1b1accf5962ebb10b7422e5ec6479e78b31b66 /builtin-merge-file.c
parent387c9d49815ef4b1cefda71cf27f199d9fb24083 (diff)
downloadgit-b541248467fa47979a34e3f1c5bbe3308fbdc4d1.tar.gz
merge.conflictstyle: choose between "merge" and "diff3 -m" styles
This teaches "git merge-file" to honor merge.conflictstyle configuration variable, whose value can be "merge" (default) or "diff3". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge-file.c')
-rw-r--r--builtin-merge-file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin-merge-file.c b/builtin-merge-file.c
index 1e92510026..45c98538cd 100644
--- a/builtin-merge-file.c
+++ b/builtin-merge-file.c
@@ -15,6 +15,15 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
int ret = 0, i = 0, to_stdout = 0;
int merge_level = XDL_MERGE_ZEALOUS_ALNUM;
int merge_style = 0;
+ int nongit;
+
+ prefix = setup_git_directory_gently(&nongit);
+ if (!nongit) {
+ /* Read the configuration file */
+ git_config(git_xmerge_config, NULL);
+ if (0 <= git_xmerge_style)
+ merge_style = git_xmerge_style;
+ }
while (argc > 4) {
if (!strcmp(argv[1], "-L") && i < 3) {