Skip to content

Commit

Permalink
format-patch: ignore diff.submodule setting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Doug Kelly authored and Junio C Hamano committed Jan 8, 2015
1 parent fe7611c commit 339de50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
4 changes: 2 additions & 2 deletions t/t4255-am-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down

0 comments on commit 339de50

Please sign in to comment.