Subject: Re: [PATCH] describe-doc:fix a obscure error description in the git log documentation

From: Đoàn Trần Công Danh <[email-masked]>
Date: Mon, 31 May 2021 13:47:06 +0700

On 2021-05-31 06:00:56+0000, Andy AO via GitGitGadget <[email-masked]> wrote:
> From: zen96285 <[email-masked]>
> 
> The git log documentation says "The default option is 'short'." This is wrong. After testing, the default value of '--decorate' is 'auto', not 'short'.
> 
> There is no difference between 'auto' and 'short' in terminal, but there is a significant difference in how they behave in the shell.The information generated by the 'short' can be saved in shell variables, while the 'auto' can't.

Please use your real name and wrap your commit message at 50
characters for subject line and 72 characters for body.

Let's the commit message aside.

The default option is documented correctly as short.
Please check out builtin/log.c:decorate_callback and
builtin/log.c:parse_decoration_style.

Below command print nothing in my machine:

	git log --decorate -1 >/tmp/default
	git log --decorate=short -1 >/tmp/short
	cmp /tmp/default /tmp/short

I'm curious about your config and/or command invocation.
>From the code, I can't guess which scenario that's different.

I think you meant:

	git log -1 >/tmp/no-decorate

In that case, please check your "log.decorate" config.

-- 
Danh