Thread (6 messages) 6 messages, 3 authors, 2021-06-08

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

From: Đoàn Trần Công Danh <hidden>
Date: 2021-05-31 06:47:15

On 2021-05-31 06:00:56+0000, Andy AO via GitGitGadget [off-list ref] wrote:
From: zen96285 <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help