]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-merge-file.c
git grep: Add "-z/--null" option as in GNU's grep.
[git.git] / builtin-merge-file.c
index 5b4f020e38d3f97e05c1d8b1c465e8fcc2a7b851..45c98538cdbf35352f7a3b5adf40fca9d7512ea5 100644 (file)
@@ -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) {
@@ -27,10 +36,8 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
                else if (!strcmp(argv[1], "-q") ||
                                !strcmp(argv[1], "--quiet"))
                        freopen("/dev/null", "w", stderr);
-               else if (!strcmp(argv[1], "--diff3")) {
+               else if (!strcmp(argv[1], "--diff3"))
                        merge_style = XDL_MERGE_DIFF3;
-                       merge_level = XDL_MERGE_EAGER;
-               }
                else
                        usage(merge_file_usage);
                argc--;