X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=ll-merge.c;h=da59738c9b787ae082ad062a91345a60628e704a;hb=9e6ed475e7a8d39350f102f0730d321de08e0585;hp=007dd3e4d38ff657a29a06e559173b796f193763;hpb=15368e1836970d87b5f29635b04c1d2144954f1f;p=git.git diff --git a/ll-merge.c b/ll-merge.c index 007dd3e4d..da59738c9 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -330,7 +330,7 @@ static int git_path_check_merge(const char *path, struct git_attr_check check[2] check[0].attr = git_attr("merge"); check[1].attr = git_attr("conflict-marker-size"); } - return git_checkattr(path, 2, check); + return git_check_attr(path, 2, check); } static void normalize_file(mmfile_t *mm, const char *path) @@ -351,16 +351,13 @@ int ll_merge(mmbuffer_t *result_buf, const struct ll_merge_options *opts) { static struct git_attr_check check[2]; + static const struct ll_merge_options default_opts; const char *ll_driver_name = NULL; int marker_size = DEFAULT_CONFLICT_MARKER_SIZE; const struct ll_merge_driver *driver; - if (!opts) { - struct ll_merge_options default_opts = {0}; - return ll_merge(result_buf, path, ancestor, ancestor_label, - ours, our_label, theirs, their_label, - &default_opts); - } + if (!opts) + opts = &default_opts; if (opts->renormalize) { normalize_file(ancestor, path); @@ -390,7 +387,7 @@ int ll_merge_marker_size(const char *path) if (!check.attr) check.attr = git_attr("conflict-marker-size"); - if (!git_checkattr(path, 1, &check) && check.value) { + if (!git_check_attr(path, 1, &check) && check.value) { marker_size = atoi(check.value); if (marker_size <= 0) marker_size = DEFAULT_CONFLICT_MARKER_SIZE;