Merge branch 'maint-1.5.6' into maint-1.6.0
[gitweb.git] / ll-merge.c
index 5ae74331bc2c55638bc5bf1bbfdc7e340199cb01..e339b8cfaca7c3a08fae4b9c54b76c0351101a2b 100644 (file)
@@ -225,7 +225,7 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
 static struct ll_merge_driver *ll_user_merge, **ll_user_merge_tail;
 static const char *default_ll_merge;
 
-static int read_merge_config(const char *var, const char *value)
+static int read_merge_config(const char *var, const char *value, void *cb)
 {
        struct ll_merge_driver *fn;
        const char *ep, *name;
@@ -233,7 +233,7 @@ static int read_merge_config(const char *var, const char *value)
 
        if (!strcmp(var, "merge.default")) {
                if (value)
-                       default_ll_merge = strdup(value);
+                       default_ll_merge = xstrdup(value);
                return 0;
        }
 
@@ -267,7 +267,7 @@ static int read_merge_config(const char *var, const char *value)
        if (!strcmp("name", ep)) {
                if (!value)
                        return error("%s: lacks value", var);
-               fn->description = strdup(value);
+               fn->description = xstrdup(value);
                return 0;
        }
 
@@ -290,14 +290,14 @@ static int read_merge_config(const char *var, const char *value)
                 * file named by %A, and signal that it has done with zero exit
                 * status.
                 */
-               fn->cmdline = strdup(value);
+               fn->cmdline = xstrdup(value);
                return 0;
        }
 
        if (!strcmp("recursive", ep)) {
                if (!value)
                        return error("%s: lacks value", var);
-               fn->recursive = strdup(value);
+               fn->recursive = xstrdup(value);
                return 0;
        }
 
@@ -309,7 +309,7 @@ static void initialize_ll_merge(void)
        if (ll_user_merge_tail)
                return;
        ll_user_merge_tail = &ll_user_merge;
-       git_config(read_merge_config);
+       git_config(read_merge_config, NULL);
 }
 
 static const struct ll_merge_driver *find_ll_merge_driver(const char *merge_attr)