1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

Merge branch 'ph/format-patch-no-color'

* ph/format-patch-no-color:
  format-patch: ignore ui.color
This commit is contained in:
Junio C Hamano 2011-09-14 21:43:57 -07:00
commit 559357b508
2 changed files with 10 additions and 1 deletions

View file

@ -608,7 +608,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
string_list_append(&extra_cc, value);
return 0;
}
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") ||
!strcmp(var, "color.ui")) {
return 0;
}
if (!strcmp(var, "format.numbered")) {

View file

@ -886,4 +886,12 @@ test_expect_success 'empty subject prefix does not have extra space' '
test_cmp expect actual
'
test_expect_success 'format patch ignores color.ui' '
test_unconfig color.ui &&
git format-patch --stdout -1 >expect &&
test_config color.ui always &&
git format-patch --stdout -1 >actual &&
test_cmp expect actual
'
test_done