format-patch: ignore diff.submodule setting

diff.submodule when set to log produces output which git-am cannot
handle. Ignore this setting when generating patch output.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Doug Kelly 2015-01-07 14:32:12 -06:00 committed by Junio C Hamano
parent fe7611c46f
commit 339de50891
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -80,12 +80,12 @@ test_expect_success 'diff.submodule unset with extra file' '
run_test $THIRD second-submodule
'
test_expect_failure 'diff.submodule=log' '
test_expect_success 'diff.submodule=log' '
test_config diff.submodule log &&
run_test $SECOND first-submodule
'
test_expect_failure 'diff.submodule=log with extra file' '
test_expect_success 'diff.submodule=log with extra file' '
test_config diff.submodule log &&
run_test $THIRD second-submodule
'