X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=combine-diff.c;h=19f30c33539f69c773c7b104be8355d4e7e4fcdd;hb=8462ff43e42ab67cecd16fdfb59451a53cc8a945;hp=9e163d5adabd93fd48a6b563c5f31c32740e01c7;hpb=01e0c53c739854fda6d601a5a49ef1ccacd156fc;p=thirdparty%2Fgit.git diff --git a/combine-diff.c b/combine-diff.c index 9e163d5ada..19f30c3353 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -898,7 +898,7 @@ static void show_combined_header(struct combine_diff_path *elem, int show_file_header) { struct diff_options *opt = &rev->diffopt; - int abbrev = DIFF_OPT_TST(opt, FULL_INDEX) ? GIT_SHA1_HEXSZ : DEFAULT_ABBREV; + int abbrev = opt->flags.full_index ? GIT_SHA1_HEXSZ : DEFAULT_ABBREV; const char *a_prefix = opt->a_prefix ? opt->a_prefix : "a/"; const char *b_prefix = opt->b_prefix ? opt->b_prefix : "b/"; const char *c_meta = diff_get_color_opt(opt, DIFF_METAINFO); @@ -987,7 +987,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent, userdiff = userdiff_find_by_path(elem->path); if (!userdiff) userdiff = userdiff_find_by_name("default"); - if (DIFF_OPT_TST(opt, ALLOW_TEXTCONV)) + if (opt->flags.allow_textconv) textconv = userdiff_get_textconv(userdiff); /* Read the result of merge first */ @@ -1014,7 +1014,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent, elem->mode = canon_mode(st.st_mode); } else if (S_ISDIR(st.st_mode)) { struct object_id oid; - if (resolve_gitlink_ref(elem->path, "HEAD", oid.hash) < 0) + if (resolve_gitlink_ref(elem->path, "HEAD", &oid) < 0) result = grab_blob(&elem->oid, elem->mode, &result_size, NULL, NULL); else @@ -1053,7 +1053,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent, if (is_file) { struct strbuf buf = STRBUF_INIT; - if (convert_to_git(&the_index, elem->path, result, len, &buf, safe_crlf)) { + if (convert_to_git(&the_index, elem->path, result, len, &buf, global_conv_flags_eol)) { free(result); result = strbuf_detach(&buf, &len); result_size = len; @@ -1413,8 +1413,8 @@ void diff_tree_combined(const struct object_id *oid, diffopts = *opt; copy_pathspec(&diffopts.pathspec, &opt->pathspec); - DIFF_OPT_SET(&diffopts, RECURSIVE); - DIFF_OPT_CLR(&diffopts, ALLOW_EXTERNAL); + diffopts.flags.recursive = 1; + diffopts.flags.allow_external = 0; /* find set of paths that everybody touches * @@ -1435,7 +1435,7 @@ void diff_tree_combined(const struct object_id *oid, * NOTE please keep this semantically in sync with diffcore_std() */ need_generic_pathscan = opt->skip_stat_unmatch || - DIFF_OPT_TST(opt, FOLLOW_RENAMES) || + opt->flags.follow_renames || opt->break_opt != -1 || opt->detect_rename || opt->pickaxe ||