Skip to content

Commit 46273df

Browse files
Denton-Lgitster
authored andcommitted
format-patch: replace erroneous and condition
Commit 30984ed (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 756fb0d commit 46273df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
835835
thread = THREAD_SHALLOW;
836836
return 0;
837837
}
838-
thread = git_config_bool(var, value) && THREAD_SHALLOW;
838+
thread = git_config_bool(var, value) ? THREAD_SHALLOW : THREAD_UNSET;
839839
return 0;
840840
}
841841
if (!strcmp(var, "format.signoff")) {

0 commit comments

Comments
 (0)