Git pretty format string equivalent of oneline, including colors -
i trying recreate git format setting of oneline format string (in order extend further).
so command
git log --format=oneline what format string equivalent of oneline? closest can is
git log --format="%h %d %s" however, not produce colors. know can hard code of them, commit hash. %d has dynamic colors, depending on shows.
turn on auto color
git log --format="%c(auto) %h %d %s" and output this

%c(…): color specification, described in color.branch.* config option; adding auto, @ beginning emit color when colors enabled log output (by color.diff, color.ui, or --color, , respecting auto settings of former if going terminal). auto alone (i.e. %c(auto)) turn on auto coloring on next placeholders until color switched again.
Comments
Post a Comment