0

Git log pretty-format has placeholder %G?

       o   %G?: show "G" for a good (valid) signature, "B" for a bad signature,
           "U" for a good signature with unknown validity, "X" for a good
           signature that has expired, "Y" for a good signature made by an
           expired key, "R" for a good signature made by a revoked key, "E" if
           the signature cannot be checked (e.g. missing key) and "N" for no
           signature

I would like to print G in green colour and B in red colour. How can I do that?

It also would be nice to replace G with good and B with bad.

Please do not suggest to use third-party cmds like sed or awk.

kyb
  • 7,233
  • 5
  • 52
  • 105

1 Answers1

0

Git doesn't provide a way to make pretty formats conditional, so there is no way to do what you want with a plain Git command. You would need to use some other tool to modify the output, which is what the Git developers would suggest in this case.

bk2204
  • 64,793
  • 6
  • 84
  • 100