git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
May 31, 2021, 06:41 UTC
Message-ID
<b5acad71-af41-ece2-6128-bca243f8f299@gmail.com>
In-Reply-To
<pull.1030.git.git.1622440856607.gitgitgadget@gmail.com>
Hi Andy, welcome to Git mailing list!
On 31/05/21 13.00, Andy AO via GitGitGadget wrote:
Show 6 quoted lines
> From: zen96285 <zen96285@gmail.com>
> 
> 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.
> 

Why are info generated with 'short' option (and not 'auto') can be assigned to a variable?

Show 11 quoted lines
> diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
> index 1bbf865a1b2d..37a4694b060a 100644
> --- a/Documentation/git-log.txt
> +++ b/Documentation/git-log.txt
> @@ -39,7 +39,7 @@ OPTIONS
>   	full ref name (including prefix) will be printed. If 'auto' is
>   	specified, then if the output is going to a terminal, the ref names
>   	are shown as if 'short' were given, otherwise no ref names are
> -	shown. The default option is 'short'.
> +	shown. The default option is 'auto'.
>   
Looks OK to me, thanks.
-- 
An old man doll... just what I always wanted! - Clara
Previous: Andy AO via GitGitGadgetNext: Đoàn Trần Công Danh
Message 2 of 8 in “describe-doc:fix a obscure error description in the git log documentation”
  1. describe-doc:fix a obscure error description in the git log documentationAndy AO via GitGitGadget, May 31, 2021
  2. Bagas SanjayaMay 31, 2021
  3. Đoàn Trần Công DanhMay 31, 2021
  4. Junio C HamanoMay 31, 2021
  5. Đoàn Trần Công DanhMay 31, 2021
  6. Bagas SanjayaMay 31, 2021
  7. Đoàn Trần Công DanhMay 31, 2021
  8. doc/log: correct default for --decorateĐoàn Trần Công Danh, Jun 8, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.