Re: [PATCH v5 1/3] format-patch: change erroneous and condition
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 15, 2019, 02:16 UTC
- Message-ID
- <xmqqeezeda7w.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <56fb230ad271dc9aa91c0f43ac8e4e7085c15775.1571085952.git.liu.denton@gmail.com>
Denton Liu <liu.denton@gmail.com> writes:
> .... Since this > seems to be a Python-ism that's mistakenly leaked into our code, convert
The conclusion is OK, but as the inventor of format-patch and a non-pythonista, I do not think the above claim is correct, and even if Thomas thought it was a good idea to follow Python style in 30984ed2 ("format-patch: support deep threading", 2009-02-19), which I doubt he did, I do not think there is much point in speculating.
Both the log message and the patch text in the previous round were better than this round, I would have to say.
Thanks.
Show 13 quoted lines
> diff --git a/builtin/log.c b/builtin/log.c
> index 44b10b3415..351f4ffcfd 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -835,7 +835,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
> thread = THREAD_SHALLOW;
> return 0;
> }
> - thread = git_config_bool(var, value) && THREAD_SHALLOW;
> + thread = git_config_bool(var, value) ? THREAD_SHALLOW : THREAD_UNSET;
> return 0;
> }
> if (!strcmp(var, "format.signoff")) {