On 2021-05-31 06:00:56+0000, Andy AO via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > From: zen96285 <zen96285@xxxxxxxxx> > > 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