summaryrefslogtreecommitdiff
path: root/t/t7502-commit.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-10-26 00:49:35 -0400
committerJunio C Hamano <gitster@pobox.com>2008-10-26 14:09:48 -0700
commit4f672ad6c77bfe73cc5dd4b240fd42303d101d2a (patch)
treee3d9e6567ef56d9d6db05bb3dadf05a62b67c4fe /t/t7502-commit.sh
parent2675773af893ae81f9b09f18c1f2ec86ca2158e7 (diff)
downloadgit-4f672ad6c77bfe73cc5dd4b240fd42303d101d2a.tar.gz
wt-status: load diff ui config
When "git status -v" shows a diff, we did not respect the user's usual diff preferences at all. Loading just git_diff_basic_config would give us things like rename limits and diff drivers. But it makes even more sense to load git_diff_ui_config, which gives us colorization if the user has requested it. Note that we need to take special care to cancel colorization when writing to the commit template file, as described in the code comments. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-xt/t7502-commit.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 3eb9faedcf..ad42c78d7c 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -89,6 +89,14 @@ test_expect_success 'verbose' '
'
+test_expect_success 'verbose respects diff config' '
+
+ git config color.diff always &&
+ git status -v >actual &&
+ grep "\[1mdiff --git" actual &&
+ git config --unset color.diff
+'
+
test_expect_success 'cleanup commit messages (verbatim,-t)' '
echo >>negative &&