summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-28 21:19:16 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-28 21:19:16 -0700
commitf946b465d7fa13a235dd5653d37c7babb1ceb233 (patch)
treed3a1aa2e6f0779e5440cec0815f0d59d9e31b4d4 /combine-diff.c
parente5cfcb04e0acc5f3b51e6d69487028315b33e4c9 (diff)
parentc9bfb953489e559d513c1627150aa16f8d42d6c5 (diff)
downloadgit-f946b465d7fa13a235dd5653d37c7babb1ceb233.tar.gz
Merge branch 'jk/color-and-pager'
* jk/color-and-pager: want_color: automatically fallback to color.ui diff: don't load color config in plumbing config: refactor get_colorbool function color: delay auto-color decision until point of use git_config_colorbool: refactor stdout_is_tty handling diff: refactor COLOR_DIFF from a flag into an int setup_pager: set GIT_PAGER_IN_USE t7006: use test_config helpers test-lib: add helper functions for config t7006: modernize calls to unset Conflicts: builtin/commit.c parse-options.c
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 178313bc23..214014dc64 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -702,9 +702,8 @@ static void show_combined_header(struct combine_diff_path *elem,
int abbrev = DIFF_OPT_TST(opt, FULL_INDEX) ? 40 : DEFAULT_ABBREV;
const char *a_prefix = opt->a_prefix ? opt->a_prefix : "a/";
const char *b_prefix = opt->b_prefix ? opt->b_prefix : "b/";
- int use_color = DIFF_OPT_TST(opt, COLOR_DIFF);
- const char *c_meta = diff_get_color(use_color, DIFF_METAINFO);
- const char *c_reset = diff_get_color(use_color, DIFF_RESET);
+ const char *c_meta = diff_get_color_opt(opt, DIFF_METAINFO);
+ const char *c_reset = diff_get_color_opt(opt, DIFF_RESET);
const char *abb;
int added = 0;
int deleted = 0;
@@ -964,7 +963,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
show_combined_header(elem, num_parent, dense, rev,
mode_differs, 1);
dump_sline(sline, cnt, num_parent,
- DIFF_OPT_TST(opt, COLOR_DIFF), result_deleted);
+ opt->use_color, result_deleted);
}
free(result);