format-patch: replace erroneous and condition

Commit 30984ed2e9 (format-patch: support deep threading, 2009-02-19), introduced the following lines: #define THREAD_SHALLOW 1 [...] thread = git_config_bool(var, value) && THREAD_SHALLOW; Since git_config_bool() returns a bool, the trailing `&& THREAD_SHALLOW` is a no-op. Replace this errorneous and condition with a ternary statement so that it is clear what the configured value is when a boolean is given. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Oct 15, 2019 at 02:06 UTC 46273df7bfdd43e5f8a190d0a80a078ca55ce5ff
1 file changed +1 -1
builtin/log.c
+1 -1
@@ -835,7 +835,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
835 thread = THREAD_SHALLOW;
836 return 0;
837 }
838 - thread = git_config_bool(var, value) && THREAD_SHALLOW;
838 + thread = git_config_bool(var, value) ? THREAD_SHALLOW : THREAD_UNSET;
839 return 0;
840 }
841 if (!strcmp(var, "format.signoff")) {