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

[PATCH] doc/log: correct default for --decorate

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Jun 8, 2021, 01:58 UTC
Message-ID
<20210608015840.24532-1-congdanhqx@gmail.com>
In-Reply-To
<pull.1030.git.git.1622440856607.gitgitgadget@gmail.com>
There're two different default options for log --decorate:
* Should `--decorate` be given without any arguments, it's default to
  `short`
* Should neither `--decorate` nor `--no-decorate` be given, it's default
  to the `log.decorate` or `auto`.
We documented the former, but not the latter.
Let's document them, too.
Reported-by: Andy AO <zen96285@gmail.com>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 I'm reluctant to send this out since I would like to see Andy get familiar
 with the list.  However, it's a while since the original patch.
 Documentation/git-log.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 1bbf865a1b..0498e7bacb 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -39,7 +39,9 @@ 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 option `--decorate` is short-hand for `--decorate=short`.
+	Default to configuration value of `log.decorate` if configured,
+	otherwise, `auto`.
 
 --decorate-refs=<pattern>::
 --decorate-refs-exclude=<pattern>::
-- 
2.32.0.5.gc7fdd17fde
Previous: Đoàn Trần Công Danh
Message 8 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.