builtin/log: honor log.decorate
commitc74271aae74c951ab321aa16fe573ea3bcab86ba
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 14 May 2017 18:00:58 +0000 (14 18:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 May 2017 02:33:19 +0000 (15 11:33 +0900)
tree42e07488454cc968c5c7e3b26dda67a7732ed26b
parent940a911f8ec00e291a66c2d1ed05293a38ae6138
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 <sandals@crustytoothpaste.net>
Acked-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c
t/t4202-log.sh