# Display a commit in red if it is not signed.

2 messages from 2018-10-02 to 2018-10-02. Participants: Jayesh Badwaik, Jeff King.
Thread: https://gitlist.dev/t/49465

## Jayesh Badwaik, 2018-10-02 09:26

Subject: Display a commit in red if it is not signed.
Message-ID: <CAGiqTF47fu85XCFnEbfMEF96v6U=N_Ferr56qAji4eLuBpyxjg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGiqTF47fu85XCFnEbfMEF96v6U%3DN_Ferr56qAji4eLuBpyxjg%40mail.gmail.com

```
Is there a way to create git pretty format that sets the color to one
color (say red) only when the commit is unsigned or the signature
cannot be verified?

Thank you

-- 
Cheers
Jayesh Badwaik
https://jayeshbadwaik.gitlab.io

```

## Jeff King, 2018-10-02 14:46

Subject: Re: Display a commit in red if it is not signed.
Message-ID: <20181002144639.GC24480@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20181002144639.GC24480%40sigill.intra.peff.net
In-Reply-To: <CAGiqTF47fu85XCFnEbfMEF96v6U=N_Ferr56qAji4eLuBpyxjg@mail.gmail.com>

```
On Tue, Oct 02, 2018 at 11:26:19AM +0200, Jayesh Badwaik wrote:

> Is there a way to create git pretty format that sets the color to one
> color (say red) only when the commit is unsigned or the signature
> cannot be verified?

Not currently. There are placeholders to show the signing information
(e.g., %G?). But the log --format language does not yet have any kind of
conditional, and I think you'd want something like "if G? is 'G', then
show this color".

The for-each-ref format language does have this. We'd like to unify them
in the long run, but it hasn't happened yet.

-Peff

```
