path: root/t
diff options
authorbrian m. carlson <>2017-05-14 18:00:58 (GMT)
committerJunio C Hamano <>2017-05-15 02:33:19 (GMT)
commitc74271aae74c951ab321aa16fe573ea3bcab86ba (patch)
tree42e07488454cc968c5c7e3b26dda67a7732ed26b /t
parent940a911f8ec00e291a66c2d1ed05293a38ae6138 (diff)
builtin/log: honor log.decorate
The recent change that introduced autodecorating of refs accidentally broke the ability of users to set log.decorate = false to override it. When the git_log_config was traversed a second time with an option other than log.decorate, the decoration style would be set to the automatic style, even if the user had already overridden it. Instead of setting the option in config parsing, set it in init_log_defaults instead. Add a test for this case. The actual additional config option doesn't matter, but it needs to be something not already set in the configuration file. Signed-off-by: brian m. carlson <> Acked-by: Alex Henrie <> Reviewed-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't')
1 files changed, 12 insertions, 0 deletions
diff --git a/t/ b/t/
index f577990..1c7d672 100755
--- a/t/
+++ b/t/
@@ -577,6 +577,18 @@ test_expect_success 'log.decorate configuration' '
+test_expect_success 'log.decorate config parsing' '
+ git log --oneline --decorate=full >expect.full &&
+ git log --oneline --decorate=short >expect.short &&
+ test_config log.decorate full &&
+ test_config log.mailmap true &&
+ git log --oneline >actual &&
+ test_cmp expect.full actual &&
+ git log --oneline --decorate=short >actual &&
+ test_cmp expect.short actual
test_expect_success TTY 'log output on a TTY' '
git log --oneline --decorate >expect.short &&