-1

This is the output when I do git log:

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. That's the commit where I checked out from. My question is: what exactl '(list)' indicate? Does it appear in any other case?

EDIT: I was confused by the name 'list'. If the name would have been 'master' or 'development' most likely this question would have never been asked. It would have been obvious what 'the flag' was referring to.

borjagvo
  • 1,802
  • 2
  • 20
  • 35
  • 1
    You can see the other things in parentheses are _branches_, does `list` appear in `git branch -la`? – jonrsharpe Apr 08 '21 at 08:08
  • 1
    Does this answer your question? [How to interpret the brackets in the git log?](https://stackoverflow.com/questions/57753595/how-to-interpret-the-brackets-in-the-git-log) – jonrsharpe Apr 08 '21 at 08:09
  • @jonrsharpe That was fast! Thanks – borjagvo Apr 08 '21 at 08:12
  • References, not branches.. E.g. HEAD isn't a branch. – Stanislav Bashkyrtsev Apr 08 '21 at 08:17
  • The person who makes the question (me) was confused due to the specific name. Would have been 'master', 'develop' this question would have never been made. So: a mistake naming a branch produced this question. – borjagvo Jan 21 '22 at 06:48

1 Answers1

1

Those are decorations. They are produced by using the --decorate option. 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.

Note that very old versions of Git do not have --decorate=auto as a default, so here, an explicit --decorate is more useful. Since --auto means --decorate=no if git log's output is not going to a "terminal", --decorate is still sometimes useful anyway.1

See also How to interpret the brackets in the git log?


1"Terminal" is defined as anything for which isatty(1) returns true. This therefore depends on the behavior of your system's C library 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.

torek
  • 448,244
  • 59
  • 642
  • 775