简体   繁体   English

(列表)在提交 SHA 的末尾

[英](list) at the end of commit SHA

This is the output when I do git log :这是我做git log时的 output :

commit 702e9a6805572075099128ab966da45b5561d50a (HEAD -> dev-832-enable-payments-from-booking-engine)
Author: Me
Date:   Thu Apr 8 09:59:05 2021 +0200

    [dev-832] Guard formatting corrections

commit fff47bee20511cad66ff60b78303779328d839e6
Author: Me
Date:   Wed Apr 7 19:10:30 2021 +0200

    [dev-832] Add relation between merchants and client_transactions

commit 72e9eb4ae83933a703d82s2abc51dc5410c85094
Author: Me
Date:   Wed Apr 7 18:51:43 2021 +0200

    [dev-832] Add missing field to clients table

commit 135dcdfa89d9b982b4466135d11cd0937848b819 (origin/dev-832-enable-payments-from-booking-engine)
Author: Me
Date:   Thu Mar 25 18:51:38 2021 +0100

    [DEV-832] Feat

commit 879aa67d9cd99c3f647111497c32683a6da6e6ba (list)
Author: Someone Else
Date:   Tue Mar 16 10:38:39 2021 +0100

    [DEV-829] Add auto correct for guard rubocop

Notice the (list) flag at the end of commit 879aa67d9cd99c3f647111497c32683a6da6e6ba.注意提交 879aa67d9cd99c3f647111497c32683a6da6e6ba 末尾的 (list) 标志。 That's the commit where I checked out from.那是我签出的提交。 My question is: what exactl '(list)' indicate?我的问题是:确切的“(列表)”表示什么? Does it appear in any other case?它是否出现在其他任何情况下?

Those are decorations .那些是装饰品 They are produced by using the --decorate option.它们是通过使用--decorate选项生成的。 If you do not ask specifically for a particular decoration option, you get the one you configured as log.decorate , and if you did not configure one, you get --decorate=auto .如果你没有特别要求特定的装饰选项,你会得到你配置为log.decorate的那个,如果你没有配置一个,你会得到--decorate=auto

Note that very old versions of Git do not have --decorate=auto as a default, so here, an explicit --decorate is more useful.请注意,非常旧的 Git 版本没有--decorate=auto作为默认值,因此在这里,显式--decorate更有用。 Since --auto means --decorate=no if git log 's output is not going to a "terminal", --decorate is still sometimes useful anyway.由于--auto意味着--decorate=no如果git log的 output 不会进入“终端”, --decorate有时仍然有用。 1 1

See also How to interpret the brackets in the git log?另请参阅如何解释 git 日志中的括号?


1 "Terminal" is defined as anything for which isatty(1) returns true . 1 “终端”被定义为isatty(1)返回true的任何东西。 This therefore depends on the behavior of your system's C library isatty function.因此,这取决于系统的 C 库isatty function 的行为。 On a Unix-like system, this means in any standard terminal window as long as you are not redirecting your git log output to a file or pipe. On a Unix-like system, this means in any standard terminal window as long as you are not redirecting your git log output to a file or pipe.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM