threads / discuss / 49465

Display a commit in red if it is not signed.

Subject: Display a commit in red if it is not signed.

## tl;dr

2 messages between Oct 2, 2018 and Oct 2, 2018.

replies: 1people: 2as markdown or json

Jayesh Badwaik· Oct 2, 2018, 09:26 UTC · lore

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· Oct 2, 2018, 14:46 UTC · re: Jayesh Badwaik · lore

Re: Display a commit in red if it is not signed.

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

← back to recent threads