summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Doug Kelly <dougk.ff7@gmail.com>2015-01-07 14:32:12 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-07 19:45:05 -0800
commit339de5089115b6d8d85c73c1b8d2aa281e9625d2 (patch)
tree2e28ebb41960d3f68b803c927098872a7fa63934
parentt4255: test am submodule with diff.submodule (diff)
downloadtgif-339de5089115b6d8d85c73c1b8d2aa281e9625d2.tar.xz
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>
-rw-r--r--builtin/log.c2
-rwxr-xr-xt/t4255-am-submodule.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 734aab3a73..cb14db4898 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -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")) {
diff --git a/t/t4255-am-submodule.sh b/t/t4255-am-submodule.sh
index 450d26136a..0ba8194403 100755
--- a/t/t4255-am-submodule.sh
+++ b/t/t4255-am-submodule.sh
@@ -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
'